From f684d4add287c9e9f7cc7e407cb4acebf59def93 Mon Sep 17 00:00:00 2001 From: qianjiuyuan <149981328+heyQianJiu@users.noreply.github.com> Date: Sun, 15 Jun 2025 23:01:14 +0800 Subject: [PATCH 1/7] =?UTF-8?q?stm32-blue-pill=20readme=5Fzh=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0flash=E8=AF=B4=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/stm32f103-blue-pill/README_zh.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bsp/stm32/stm32f103-blue-pill/README_zh.md b/bsp/stm32/stm32f103-blue-pill/README_zh.md index fa65db2438e..2f705134bc6 100644 --- a/bsp/stm32/stm32f103-blue-pill/README_zh.md +++ b/bsp/stm32/stm32f103-blue-pill/README_zh.md @@ -26,7 +26,7 @@ STM32F103C8T6最小系统,采用SWD调试接口,可以用3个接口就能完 该开发板常用 **板载资源** 如下: -- MCU:STM32F103C8T6,主频 72MHz,64KB FLASH ,20KB RAM +- MCU:STM32F103C8T6,主频 72MHz,64KB FLASH(实际可烧录128KB) ,20KB RAM - 外部 RAM:无 - 外部 FLASH:无 - 常用外设 @@ -116,6 +116,9 @@ msh > ## 注意事项 - 只能用USB转TTL连接PC机 ; +- +### 关于Flash +STM32F103C8T6和STM32F103CBT6(128KB Flash)是基于同一芯片制造的,但在出厂时,STM32F103C8T6仅对前64KB进行了测试和认证,因此官方文档中仅标注为64KB。链接脚本故意改成128kb的,解锁高64kb。 From b597dcae4f6254c8945168f0af41754f55db48dc Mon Sep 17 00:00:00 2001 From: qianjiuyuan <149981328+heyQianJiu@users.noreply.github.com> Date: Sun, 15 Jun 2025 23:04:44 +0800 Subject: [PATCH 2/7] =?UTF-8?q?blue-pill=20attachconfig=E6=95=B4=E7=90=86?= =?UTF-8?q?=E4=B8=BAyml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.ci/attachconfig/ci.attachconfig.yml | 19 +++++++++++++++++++ .../.ci/attachconfig/nano.attach | 2 -- .../.ci/attachconfig/rtduino.attach | 2 -- 3 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml delete mode 100644 bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach delete mode 100644 bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml new file mode 100644 index 00000000000..2887d264dfa --- /dev/null +++ b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml @@ -0,0 +1,19 @@ +scons.args: &scons + scons_arg: + - '--strict' +# ------ nano ------ +nano: + <<: *scons + kconfig: + - CONFIG_RT_USING_NANO=y +# ------ peripheral ------ +peripheral.adruino: + <<: *scons + kconfig: + - CONFIG_BSP_USING_ARDUINO=y +peripheral.usb2usart: + <<: *scons + kconfig: + - CONFIG_BSP_USING_GPIO=y + - CONFIG_BSP_USING_UART=y + - CONFIG_USING_SERIAL=y diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach deleted file mode 100644 index f1ad05b2391..00000000000 --- a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/nano.attach +++ /dev/null @@ -1,2 +0,0 @@ -# scons: --strict -CONFIG_RT_USING_NANO=y diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach deleted file mode 100644 index c14014d5c7e..00000000000 --- a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach +++ /dev/null @@ -1,2 +0,0 @@ -# scons: --strict -CONFIG_BSP_USING_ARDUINO=y From 98909b4d3e3e702c46d948f452ec7ef1adbace8e Mon Sep 17 00:00:00 2001 From: qianjiuyuan <149981328+heyQianJiu@users.noreply.github.com> Date: Sun, 15 Jun 2025 23:37:48 +0800 Subject: [PATCH 3/7] =?UTF-8?q?yml=E6=B7=BB=E5=8A=A0=E5=B8=B8=E7=94=A8?= =?UTF-8?q?=E5=A4=96=E8=AE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.ci/attachconfig/ci.attachconfig.yml | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml index 2887d264dfa..5145b2b3acd 100644 --- a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml +++ b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml @@ -5,15 +5,40 @@ scons.args: &scons nano: <<: *scons kconfig: - - CONFIG_RT_USING_NANO=y + - CONFIG_USING_NANO=y # ------ peripheral ------ -peripheral.adruino: +peripheral.arduino: <<: *scons kconfig: - - CONFIG_BSP_USING_ARDUINO=y -peripheral.usb2usart: + - CONFIG_BSP_USING_ARDUINO=y +peripheral.usbd: + <<: *scons + kconfig: + - CONFIG_BSP_USING_USBD=y +# ------ devices ------ +devices.uart1: <<: *scons kconfig: - CONFIG_BSP_USING_GPIO=y - CONFIG_BSP_USING_UART=y - CONFIG_USING_SERIAL=y +devices.i2c1: + <<: *scons + kconfig: + - CONFIG_BSP_USING_I2C1=y +devices.pwm2: + <<: *scons + kconfig: + - CONFIG_BSP_USING_PWM=y + - CONFIG_BSP_USING_PWM2=y + - CONFIG_BSP_USING_PWM2_CH1=y +devices.spi2: + <<: *scons + kconfig: + - CONFIG_BSP_USING_SPI=y + - CONFIG_BSP_USING_SPI2=y +devices.adc: + <<: *scons + kconfig: + - CONFIG_BSP_USING_ADC=y + - CONFIG_BSP_USING_ADC1=y \ No newline at end of file From 96d97bb9e1361875192e9b736179f22c98d521cf Mon Sep 17 00:00:00 2001 From: qianjiuyuan <149981328+heyQianJiu@users.noreply.github.com> Date: Mon, 16 Jun 2025 09:27:59 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=AB=9864kb=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E9=9D=A0=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32/stm32f103-blue-pill/README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/stm32/stm32f103-blue-pill/README_zh.md b/bsp/stm32/stm32f103-blue-pill/README_zh.md index 2f705134bc6..0066e6eecea 100644 --- a/bsp/stm32/stm32f103-blue-pill/README_zh.md +++ b/bsp/stm32/stm32f103-blue-pill/README_zh.md @@ -119,7 +119,7 @@ msh > - ### 关于Flash STM32F103C8T6和STM32F103CBT6(128KB Flash)是基于同一芯片制造的,但在出厂时,STM32F103C8T6仅对前64KB进行了测试和认证,因此官方文档中仅标注为64KB。链接脚本故意改成128kb的,解锁高64kb。 - +注意:高64kb并不完全可靠,若是烧录超过64kb代码后运行出错,可能是硬件flash问题。 ## 感谢 & 维护 From dd7a5f27f8fa30062a238bac03081ab63e1fcffc Mon Sep 17 00:00:00 2001 From: qianjiuyuan <149981328+heyQianJiu@users.noreply.github.com> Date: Mon, 16 Jun 2025 10:13:19 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=BC=80=E5=90=AFnano?= =?UTF-8?q?=E5=92=8C=E7=BB=88=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../.ci/attachconfig/ci.attachconfig.yml | 5 +- bsp/stm32/stm32f103-blue-pill/README_zh.md | 7 +- bsp/stm32/stm32f103-blue-pill/project.ewp | 169 +++++++++------ bsp/stm32/stm32f103-blue-pill/project.uvprojx | 193 ++++++++++++------ 4 files changed, 246 insertions(+), 128 deletions(-) diff --git a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml index 5145b2b3acd..deedfad07dd 100644 --- a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml +++ b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml @@ -5,7 +5,9 @@ scons.args: &scons nano: <<: *scons kconfig: - - CONFIG_USING_NANO=y + - CONFIG_RT_USING_NANO=y + - CONFIG_BSP_USING_GPIO=y + - CONFIG_BSP_USING_UART=y # ------ peripheral ------ peripheral.arduino: <<: *scons @@ -21,7 +23,6 @@ devices.uart1: kconfig: - CONFIG_BSP_USING_GPIO=y - CONFIG_BSP_USING_UART=y - - CONFIG_USING_SERIAL=y devices.i2c1: <<: *scons kconfig: diff --git a/bsp/stm32/stm32f103-blue-pill/README_zh.md b/bsp/stm32/stm32f103-blue-pill/README_zh.md index 0066e6eecea..7a08fe01dfb 100644 --- a/bsp/stm32/stm32f103-blue-pill/README_zh.md +++ b/bsp/stm32/stm32f103-blue-pill/README_zh.md @@ -88,7 +88,7 @@ pkgs --update 下载程序成功之后,系统会自动运行,LED 闪烁 -连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息: +连接开发板对应串口到 PC(PA9,PA10) , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息: ```bash \ | / @@ -121,7 +121,10 @@ msh > STM32F103C8T6和STM32F103CBT6(128KB Flash)是基于同一芯片制造的,但在出厂时,STM32F103C8T6仅对前64KB进行了测试和认证,因此官方文档中仅标注为64KB。链接脚本故意改成128kb的,解锁高64kb。 注意:高64kb并不完全可靠,若是烧录超过64kb代码后运行出错,可能是硬件flash问题。 - +默认开启nano版本,其余配置可通过以下命令查看 +```bash +scons --attach=? +``` ## 感谢 & 维护 - 感谢[obito0](https://github.com/obito0)提供的[原始工程](../stm32f103-mini-system) diff --git a/bsp/stm32/stm32f103-blue-pill/project.ewp b/bsp/stm32/stm32f103-blue-pill/project.ewp index 4d0af016a4c..2966aa8a8ee 100644 --- a/bsp/stm32/stm32f103-blue-pill/project.ewp +++ b/bsp/stm32/stm32f103-blue-pill/project.ewp @@ -219,7 +219,6 @@ RT_USING_DLIBC RT_USING_LIBC _DLIB_ADD_EXTRA_SYMBOLS=0 - STM32F103xB __RTTHREAD__ USE_HAL_DRIVER __RT_IPC_SOURCE__ @@ -349,28 +348,30 @@