[bsp]stm32f103-keysking 驱动:uart、pwm、pulse encoder#10330
[bsp]stm32f103-keysking 驱动:uart、pwm、pulse encoder#10330supperthomas merged 11 commits intoRT-Thread:masterfrom
Conversation
action编译报错:
board/CubeMX_Config/Src/stm32f1xx_hal_msp.c:23:10: fatal error: main.h: No such file or directory
23 | #include "main.h"
| ^~~~~~~~
| # CONFIG_RT_USING_RANDOM is not set | ||
| # CONFIG_RT_USING_PWM is not set | ||
| # CONFIG_RT_USING_PULSE_ENCODER is not set | ||
| CONFIG_RT_USING_PWM=y |
|
作者是否愿意负责此BSP的看护工作,可以的话欢迎添加到MAINTAINERS中:https://github.com/RT-Thread/rt-thread/blob/master/MAINTAINERS |
请问看护需要做什么呢?跟进新功能吗 |
可详见文章中的审核团成员职责章节:https://mp.weixin.qq.com/s/h3WFcTu5Y61qBxFGS8uaxQ |
| # CONFIG_RT_USING_PWM is not set | ||
| # CONFIG_RT_USING_PULSE_ENCODER is not set | ||
| CONFIG_RT_USING_PWM=y | ||
| CONFIG_RT_USING_PULSE_ENCODER=y |
There was a problem hiding this comment.
这里保留最小配置即可,其他配置可以用yml来加ci检查和使用。
rtconfig.h和.config没有特殊情况,不需要修改和提交
请问是直接加还是通过后面那个链接的二维码报名呀? |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for new peripheral drivers—UART, PWM, and pulse encoder—for the stm32f103-keysking-learning board.
- Enables PWM and pulse encoder functionality in rtconfig.h.
- Updates project and board configuration files (Kconfig, .uvprojx, .ewp, CubeMX_Config files) to include new source files and peripheral mappings.
- Revises the README and CI attachment configurations to document and test the new features.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| rtconfig.h | Adds RT_USING_PWM and RT_USING_PULSE_ENCODER macros. |
| project.uvprojx & project.ewp | Updates project file definitions and include paths for added drivers. |
| board/Kconfig | Introduces new configuration options for servo, PWM, and pulse encoder. |
| CubeMX_Config (stm32f1xx_hal_msp.c, .ioc, etc.) | Adjusts HAL initialization and pin mappings for new peripherals. |
| README.md | Updates board peripheral support information. |
| .config | Adjusts BSP configuration settings for new drivers. |
| .ci/attachconfig/ci.attachconfig.yml | Adds attach config entries for servo and pulse encoder devices. |
| # CONFIG_BSP_USING_UART3 is not set | ||
| # CONFIG_BSP_USING_PWM is not set | ||
| # CONFIG_BSP_USING_PULSE_ENCODER is not set |
There was a problem hiding this comment.
The .config file still shows BSP_USING_UART3, BSP_USING_PWM, and BSP_USING_PULSE_ENCODER as disabled, which conflicts with their usage in rtconfig.h and the CI attachment. Please ensure that the configuration defaults are consistent across the files.
| # CONFIG_BSP_USING_UART3 is not set | |
| # CONFIG_BSP_USING_PWM is not set | |
| # CONFIG_BSP_USING_PULSE_ENCODER is not set | |
| CONFIG_BSP_USING_UART3=y | |
| CONFIG_BSP_USING_PWM=y | |
| CONFIG_BSP_USING_PULSE_ENCODER=y |
| select BSP_USING_UART | ||
| select BSP_USING_UART2 | ||
| default y | ||
| config BSP_USING_SERVO |
There was a problem hiding this comment.
The servo configuration defaults to disabled (default n) in Kconfig, yet the CI attach configuration forces CONFIG_BSP_USING_SERVO to y. Please review and align the defaults across configurations.
|
.config 删除,不用提交。 |
你好 删除了好像过不了ci是没问题的吗😭 |
不是说让你删除,是让你不要提交,你恢复到上一个版本即可,你看你的PR里面不要有.config的修改。 |
不用提交.config就行啦 |
这个配置名称呢? |
| @@ -5,12 +5,18 @@ system.use_nano: | |||
| <<: *scons | |||
| kconfig: | |||
| CONFIG_RT_USING_NANO=y | |||
There was a problem hiding this comment.
nano:
scons_arg:
- '--strict'
kconfig:
- CONFIG_RT_USING_NANO=y
There was a problem hiding this comment.
本地有试过:
scons --attach=system.use_nano 生效吗?
There was a problem hiding this comment.
本地试虽然显示成功但是其实没成功,我之前看success了以为没问题了。请问是只有devices开头的命令才会生效吗,我刚才试了一下定义其他类也是失败的
There was a problem hiding this comment.
用这个吧,或者不是必须测的就去掉吧。其他bsp已经测过nano了
nano:
scons_arg:
- '--strict'
kconfig:
- CONFIG_RT_USING_NANO=y
| @@ -5,12 +5,18 @@ system.use_nano: | |||
| <<: *scons | |||
| kconfig: | |||
| CONFIG_RT_USING_NANO=y | |||
There was a problem hiding this comment.
用这个吧,或者不是必须测的就去掉吧。其他bsp已经测过nano了
nano:
scons_arg:
- '--strict'
kconfig:
- CONFIG_RT_USING_NANO=y
|
yml只需要保留你自己认为该bsp常用的配置即可。 |
| @@ -5,12 +5,18 @@ system.use_nano: | |||
| <<: *scons | |||
| kconfig: | |||
| CONFIG_RT_USING_NANO=y | |||
明白了🌹 |



拉取/合并请求描述:(PR description)
[
stm32f103-keysking-learning
为什么提交这份PR (why to submit this PR)
为stm32f103-keysking-learning的bsp添加uart、pwm、pulse encoder驱动
你的解决方案是什么 (what is your solution)
请提供验证的bsp和config (provide the config and bsp)
]
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up