From f35c775cd48baea5b89f361d25105eff1fc207b5 Mon Sep 17 00:00:00 2001 From: qianjiuyuan <149981328+heyQianJiu@users.noreply.github.com> Date: Mon, 16 Jun 2025 23:35:13 +0800 Subject: [PATCH] =?UTF-8?q?[bsp]bluepill=20readme=E8=A1=A5=E5=85=85flash?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=8C=E6=95=B4=E7=90=86attachconfig?= =?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 | 44 +++++++++++++++++++ .../.ci/attachconfig/nano.attach | 2 - .../.ci/attachconfig/rtduino.attach | 2 - bsp/stm32/stm32f103-blue-pill/README_zh.md | 14 ++++-- 4 files changed, 54 insertions(+), 8 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 0000000000..bec3d8400c --- /dev/null +++ b/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml @@ -0,0 +1,44 @@ +scons.args: &scons + scons_arg: + - '--strict' +# ------ nano ------ +nano: + <<: *scons + kconfig: + - CONFIG_RT_USING_NANO=y +# ------ peripheral ------ +peripheral.arduino: + <<: *scons + kconfig: + - 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 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 f1ad05b239..0000000000 --- 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 c14014d5c7..0000000000 --- a/bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/rtduino.attach +++ /dev/null @@ -1,2 +0,0 @@ -# scons: --strict -CONFIG_BSP_USING_ARDUINO=y diff --git a/bsp/stm32/stm32f103-blue-pill/README_zh.md b/bsp/stm32/stm32f103-blue-pill/README_zh.md index fa65db2438..80fa2ccc16 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:无 - 常用外设 @@ -88,7 +88,7 @@ pkgs --update 下载程序成功之后,系统会自动运行,LED 闪烁 -连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息: +连接开发板对应串口到 PC(PA9,PA10) , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息: ```bash \ | / @@ -116,9 +116,15 @@ msh > ## 注意事项 - 只能用USB转TTL连接PC机 ; +- +### 关于Flash +STM32F103C8T6和STM32F103CBT6(128KB Flash)是基于同一芯片制造的,但在出厂时,STM32F103C8T6仅对前64KB进行了测试和认证,因此官方文档中仅标注为64KB。链接脚本故意改成128kb的,解锁高64kb。 +注意:高64kb并不完全可靠,若是烧录超过64kb代码后运行出错,可能是硬件flash问题。 - - +可通过以下指令查看快速配置的内容,如果开启nano可以仅保留核心功能,减少代码占用。 +```bash +scons --attach=? +``` ## 感谢 & 维护 - 感谢[obito0](https://github.com/obito0)提供的[原始工程](../stm32f103-mini-system)