diff --git a/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md b/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md index b57dfda12a..ff0ead3e28 100644 --- a/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md +++ b/bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md @@ -68,21 +68,27 @@ Create a CubeMX project based on the target chip. The default CubeMX project is Change the chip model to STM32F103C8Tx in the CubeMX project. +Note:The version of CubeMX used in this article is 6.12.0 + #### 3.2.1 Generate CubeMX project Configure the system clock, peripheral pins, etc. The steps are shown in the figure below: 1. Turn on the external clock, set the download mode, and turn on the serial peripherals (note that only the pins of the serial peripherals need to be selected, no other parameters need to be configured): - ![Configure chip pins](./figures_en/CubeMX_1.png) + ![Turn on the clock](./figures_en/CubeMX_1.png) + + ![Configuring the download Mode](figures_en/CubeMX_2.png) + + ![Open the serial port](figures_en/CubeMX_3.png) 2. Configure the system clock: - ![Configuring the System Clock](./figures_en/CubeMX_2.png) + ![Configuring the System Clock](./figures_en/CubeMX_4.png) 3. Set the project name and regenerate the CubeMX project at a specified address: - ![Generate the corresponding configuration code](./figures_en/CubeMX_4.png) + ![Generate the corresponding configuration code](./figures_en/CubeMX_5.png) Note: When generating the code, do not check the following options (ie: Do not let it generate a peripheral initialization as a pair of .c/.h files per perioheral.) @@ -90,7 +96,7 @@ Configure the system clock, peripheral pins, etc. The steps are shown in the fig 4. The final project directory structure generated by CubeMX is shown in the figure below: - ![CubeMX 7](./figures_en/CubeMX_5.png) + ![CubeMX 7](./figures_en/CubeMX_6.png) #### 3.2.2 Copy initialization function diff --git a/bsp/stm32/docs/STM32系列BSP制作教程.md b/bsp/stm32/docs/STM32系列BSP制作教程.md index fc32ecdcdc..b70fa1439b 100644 --- a/bsp/stm32/docs/STM32系列BSP制作教程.md +++ b/bsp/stm32/docs/STM32系列BSP制作教程.md @@ -101,21 +101,33 @@ BSP 的制作过程分为如下五个步骤: 在 CubeMX 工程中将芯片型号为修改芯片型号为 STM32F103RBTx 。 +注意:本文使用的CubeMX版本为6.12.0 + #### 3.2.1 生成 CubeMX 工程 配置系统时钟、外设引脚等,步骤如下图所示: 1. 打开外部时钟、设置下载方式、打开串口外设(注意只需要选择串口外设引脚即可,无需配置其他参数): -![配置芯片引脚](./figures/CubeMX_1.png) +![打开外部时钟](./figures/CubeMX_1.png) + +![设置下载方式](./figures/CubeMX_2.png) + + + +![配置串口](figures/CubeMX_3.png) + + + + 2. 配置系统时钟: -![配置系统时钟](./figures/CubeMX_2.png) +![配置系统时钟](figures/CubeMX_4.png) 3. 设置项目名称,并在指定地址重新生成 CubeMX 工程: -![生成对应的配置代码](./figures/CubeMX_4.png) +![生成对应的配置代码](figures/CubeMX_5.png) 注意:在生成代码时,不要勾选以下选项(即:不让其生成单独的 .c/.h 驱动文件,直接全部更新到 rt-thread 要使用的 stm32xxx_hal_msp.c 文件中) @@ -123,7 +135,7 @@ BSP 的制作过程分为如下五个步骤: 最终 CubeMX 生成的工程目录结构如下图所示: -![CubeMX 图7](./figures/CubeMX_5.png) +![CubeMX 图7](./figures/CubeMX_6.png) #### 3.2.2 拷贝初始化函数 diff --git a/bsp/stm32/docs/figures/CubeMX_1.png b/bsp/stm32/docs/figures/CubeMX_1.png index 676238dd62..07a60f7b7c 100644 Binary files a/bsp/stm32/docs/figures/CubeMX_1.png and b/bsp/stm32/docs/figures/CubeMX_1.png differ diff --git a/bsp/stm32/docs/figures/CubeMX_2.png b/bsp/stm32/docs/figures/CubeMX_2.png index 2a15bcb9fb..352a36db48 100644 Binary files a/bsp/stm32/docs/figures/CubeMX_2.png and b/bsp/stm32/docs/figures/CubeMX_2.png differ diff --git a/bsp/stm32/docs/figures/CubeMX_3.png b/bsp/stm32/docs/figures/CubeMX_3.png index 6926aed72d..6683b05f78 100644 Binary files a/bsp/stm32/docs/figures/CubeMX_3.png and b/bsp/stm32/docs/figures/CubeMX_3.png differ diff --git a/bsp/stm32/docs/figures/CubeMX_4.png b/bsp/stm32/docs/figures/CubeMX_4.png index 055e1a5d56..54433b5384 100644 Binary files a/bsp/stm32/docs/figures/CubeMX_4.png and b/bsp/stm32/docs/figures/CubeMX_4.png differ diff --git a/bsp/stm32/docs/figures/CubeMX_5.png b/bsp/stm32/docs/figures/CubeMX_5.png index ec5f929abd..937e7a4780 100644 Binary files a/bsp/stm32/docs/figures/CubeMX_5.png and b/bsp/stm32/docs/figures/CubeMX_5.png differ diff --git a/bsp/stm32/docs/figures/CubeMX_6.png b/bsp/stm32/docs/figures/CubeMX_6.png new file mode 100644 index 0000000000..ec5f929abd Binary files /dev/null and b/bsp/stm32/docs/figures/CubeMX_6.png differ diff --git a/bsp/stm32/docs/figures_en/CubeMX_1.png b/bsp/stm32/docs/figures_en/CubeMX_1.png index df1501aa3d..07a60f7b7c 100644 Binary files a/bsp/stm32/docs/figures_en/CubeMX_1.png and b/bsp/stm32/docs/figures_en/CubeMX_1.png differ diff --git a/bsp/stm32/docs/figures_en/CubeMX_2.png b/bsp/stm32/docs/figures_en/CubeMX_2.png index f4d55c961d..352a36db48 100644 Binary files a/bsp/stm32/docs/figures_en/CubeMX_2.png and b/bsp/stm32/docs/figures_en/CubeMX_2.png differ diff --git a/bsp/stm32/docs/figures_en/CubeMX_3.png b/bsp/stm32/docs/figures_en/CubeMX_3.png index 4b5fc8870a..6683b05f78 100644 Binary files a/bsp/stm32/docs/figures_en/CubeMX_3.png and b/bsp/stm32/docs/figures_en/CubeMX_3.png differ diff --git a/bsp/stm32/docs/figures_en/CubeMX_4.png b/bsp/stm32/docs/figures_en/CubeMX_4.png index de0c6188cd..54433b5384 100644 Binary files a/bsp/stm32/docs/figures_en/CubeMX_4.png and b/bsp/stm32/docs/figures_en/CubeMX_4.png differ diff --git a/bsp/stm32/docs/figures_en/CubeMX_5.png b/bsp/stm32/docs/figures_en/CubeMX_5.png index 501bf30659..937e7a4780 100644 Binary files a/bsp/stm32/docs/figures_en/CubeMX_5.png and b/bsp/stm32/docs/figures_en/CubeMX_5.png differ diff --git a/bsp/stm32/docs/figures_en/CubeMX_6.png b/bsp/stm32/docs/figures_en/CubeMX_6.png new file mode 100644 index 0000000000..501bf30659 Binary files /dev/null and b/bsp/stm32/docs/figures_en/CubeMX_6.png differ