Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【增加】cubemx 生成代码时的注意事项 #4978

Merged
merged 1 commit into from
Aug 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bsp/stm32/docs/STM32系列BSP制作教程.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ BSP 的制作过程分为如下五个步骤:

![生成对应的配置代码](./figures/CubeMX_4.png)

注意:在生成代码时,不要勾选以下选项(即:不让其生成单独的 .c/.h 驱动文件,直接全部更新到 rt-thread 要使用的 stm32xxx_hal_msp.c 文件中)

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

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

![CubeMX 图7](./figures/CubeMX_5.png)
Expand Down
3 changes: 3 additions & 0 deletions bsp/stm32/docs/STM32系列外设驱动添加指南.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
- 部分驱动如果没有适配 BSP 所属的 STM32 系列,请等待 RT-Thread 团队更新。
- 驱动文件对 STM32 系列的支持情况可以查看 [STM32系列驱动介绍文档](STM32系列驱动介绍文档.md)。
- 对于驱动文件或文档说明,有任何建议或者意见,欢迎反馈到 [RT_Thread GitHub](https://github.com/RT-Thread/rt-thread) 网站或 [RT-Thread 官方论坛](https://www.rt-thread.org/qa/forum.php)。
- 在生成代码时,不要勾选以下选项(即:不让其生成单独的 .c/.h 驱动文件,直接全部更新到 rt-thread 要使用的 stm32xxx_hal_msp.c 文件中)

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

## 5. 附录

Expand Down
Binary file added bsp/stm32/docs/figures/generate-code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.