Skip to content

Commit

Permalink
[bsp][stm32][dosc]update bsp make
Browse files Browse the repository at this point in the history
  • Loading branch information
CYFS3 committed Sep 28, 2024
1 parent 5562779 commit 39fca7a
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 8 deletions.
12 changes: 8 additions & 4 deletions bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,27 @@ Configure the system clock, peripheral pins, etc. The steps are shown in the fig

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.)

![generate-code](figures/generate-code.png)

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

Expand Down
18 changes: 14 additions & 4 deletions bsp/stm32/docs/STM32系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,33 @@ BSP 的制作过程分为如下五个步骤:

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 文件中)

![generate-code](figures/generate-code.png)

最终 CubeMX 生成的工程目录结构如下图所示:

![CubeMX 图7](./figures/CubeMX_5.png)
![CubeMX 图7](./figures/CubeMX_6.png)

#### 3.2.2 拷贝初始化函数

Expand Down
Binary file modified bsp/stm32/docs/figures/CubeMX_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures/CubeMX_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures/CubeMX_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures/CubeMX_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures/CubeMX_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bsp/stm32/docs/figures/CubeMX_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures_en/CubeMX_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures_en/CubeMX_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures_en/CubeMX_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures_en/CubeMX_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified bsp/stm32/docs/figures_en/CubeMX_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bsp/stm32/docs/figures_en/CubeMX_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 39fca7a

Please sign in to comment.