Skip to content

Commit 5882e6a

Browse files
Old-DingRbb666
authored andcommitted
docs: clarify STM32 BSP template usage
1 parent 313e159 commit 5882e6a

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

bsp/stm32/docs/How to make a STM32 BSP for RT-Thread.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ Copy the `stm32f10x` folder under the template folder and change the name of the
5050

5151
![Copying common templates](./figures_en/copy.png)
5252

53+
Note: Do not run `menuconfig` or `scons` directly inside `bsp/stm32/libraries/templates/<series>`.
54+
The template directory is two levels deeper than a real BSP because of `libraries/templates`, so the
55+
relative paths in `Kconfig` match only after the template has been copied to `bsp/stm32/<board>`.
56+
Copy the matching series template into `bsp/stm32/`, rename it to the target BSP name, and then run
57+
`menuconfig`, `pkgs --update`, and `scons` from the new BSP directory.
58+
5359
Modify the configuration file in the board folder. The modified content is shown in the following table:
5460

5561
| Item | Instruction |

bsp/stm32/docs/STM32系列BSP制作教程.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ BSP 的制作过程分为如下五个步骤:
8383

8484
![复制通用模板](./figures/copy.png)
8585

86+
注意:不要直接在 `bsp/stm32/libraries/templates/<series>` 模板目录中执行 `menuconfig``scons`
87+
模板目录比实际 BSP 目录多了 `libraries/templates` 两级,`Kconfig` 中的相对路径只在模板被复制到
88+
`bsp/stm32/<board>` 后才匹配。请先将同系列模板复制到 `bsp/stm32/` 目录下并重命名为目标 BSP 名称,
89+
再进入新的 BSP 目录执行 `menuconfig``pkgs --update``scons`
90+
8691
在接下来的 BSP 的制作过程中,将会修改 board 文件夹内的配置文件,将 F1 系列的 BSP 模板变成一个适用于正点原子 `stm32f103-atk-nano` 开发板的 BSP ,下表总结了 board 文件夹中需要修改的内容:
8792

8893
| 项目 | 需要修改的内容说明 |

0 commit comments

Comments
 (0)