Skip to content

Commit dd7a5f2

Browse files
committed
默认开启nano和终端
1 parent 96d97bb commit dd7a5f2

File tree

4 files changed

+246
-128
lines changed

4 files changed

+246
-128
lines changed

bsp/stm32/stm32f103-blue-pill/.ci/attachconfig/ci.attachconfig.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ scons.args: &scons
55
nano:
66
<<: *scons
77
kconfig:
8-
- CONFIG_USING_NANO=y
8+
- CONFIG_RT_USING_NANO=y
9+
- CONFIG_BSP_USING_GPIO=y
10+
- CONFIG_BSP_USING_UART=y
911
# ------ peripheral ------
1012
peripheral.arduino:
1113
<<: *scons
@@ -21,7 +23,6 @@ devices.uart1:
2123
kconfig:
2224
- CONFIG_BSP_USING_GPIO=y
2325
- CONFIG_BSP_USING_UART=y
24-
- CONFIG_USING_SERIAL=y
2526
devices.i2c1:
2627
<<: *scons
2728
kconfig:

bsp/stm32/stm32f103-blue-pill/README_zh.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pkgs --update
8888

8989
下载程序成功之后,系统会自动运行,LED 闪烁
9090

91-
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
91+
连接开发板对应串口到 PC(PA9,PA10) , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
9292

9393
```bash
9494
\ | /
@@ -121,7 +121,10 @@ msh >
121121
STM32F103C8T6和STM32F103CBT6(128KB Flash)是基于同一芯片制造的,但在出厂时,STM32F103C8T6仅对前64KB进行了测试和认证,因此官方文档中仅标注为64KB。链接脚本故意改成128kb的,解锁高64kb。
122122
注意:高64kb并不完全可靠,若是烧录超过64kb代码后运行出错,可能是硬件flash问题。
123123

124-
124+
默认开启nano版本,其余配置可通过以下命令查看
125+
```bash
126+
scons --attach=?
127+
```
125128
## 感谢 & 维护
126129

127130
- 感谢[obito0](https://github.com/obito0)提供的[原始工程](../stm32f103-mini-system)

bsp/stm32/stm32f103-blue-pill/project.ewp

Lines changed: 102 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@
219219
<state>RT_USING_DLIBC</state>
220220
<state>RT_USING_LIBC</state>
221221
<state>_DLIB_ADD_EXTRA_SYMBOLS=0</state>
222-
<state>STM32F103xB</state>
223222
<state>__RTTHREAD__</state>
224223
<state>USE_HAL_DRIVER</state>
225224
<state>__RT_IPC_SOURCE__</state>
@@ -349,28 +348,30 @@
349348
<option>
350349
<name>CCIncludePath2</name>
351350
<state />
352-
<state>$PROJ_DIR$\..\..\..\components\finsh</state>
353-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers</state>
354-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers\config</state>
355-
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
356-
<state>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\CMSIS\Device\ST\STM32F1xx\Include</state>
357-
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension</state>
358-
<state>$PROJ_DIR$\board\CubeMX_Config\Inc</state>
359-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\ipc</state>
360-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\CMSIS\Include</state>
361351
<state>$PROJ_DIR$\.</state>
362-
<state>$PROJ_DIR$\board</state>
363-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers</state>
364-
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension\fcntl\octal</state>
365-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\epoll</state>
366-
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\include</state>
367-
<state>$PROJ_DIR$\applications</state>
368-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\poll</state>
352+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\eventfd</state>
369353
<state>$PROJ_DIR$\..\..\..\include</state>
354+
<state>$PROJ_DIR$\board\CubeMX_Config\Inc</state>
355+
<state>$PROJ_DIR$\..\..\..\components\finsh</state>
370356
<state>$PROJ_DIR$\..\..\..\libcpu\arm\cortex-m3</state>
357+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\poll</state>
358+
<state>$PROJ_DIR$\..\..\..\components\drivers\phy</state>
359+
<state>$PROJ_DIR$\..\libraries\HAL_Drivers</state>
360+
<state>$PROJ_DIR$\board</state>
361+
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension</state>
371362
<state>$PROJ_DIR$\..\..\..\libcpu\arm\common</state>
372-
<state>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Inc</state>
373-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\eventfd</state>
363+
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers\config</state>
364+
<state>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Inc</state>
365+
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\include</state>
366+
<state>$PROJ_DIR$\applications</state>
367+
<state>$PROJ_DIR$\packages\CMSIS-Core-latest\Include</state>
368+
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension\fcntl\octal</state>
369+
<state>$PROJ_DIR$\..\..\..\components\drivers\smp_call</state>
370+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\epoll</state>
371+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\ipc</state>
372+
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
373+
<state>$PROJ_DIR$\packages\stm32f1_cmsis_driver-latest\Include</state>
374+
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers</state>
374375
</option>
375376
<option>
376377
<name>CCStdIncCheck</name>
@@ -1264,7 +1265,6 @@
12641265
<state>RT_USING_DLIBC</state>
12651266
<state>RT_USING_LIBC</state>
12661267
<state>_DLIB_ADD_EXTRA_SYMBOLS=0</state>
1267-
<state>STM32F103xB</state>
12681268
<state>__RTTHREAD__</state>
12691269
<state>USE_HAL_DRIVER</state>
12701270
<state>__RT_IPC_SOURCE__</state>
@@ -1394,28 +1394,30 @@
13941394
<option>
13951395
<name>CCIncludePath2</name>
13961396
<state />
1397-
<state>$PROJ_DIR$\..\..\..\components\finsh</state>
1398-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers</state>
1399-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers\config</state>
1400-
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
1401-
<state>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\CMSIS\Device\ST\STM32F1xx\Include</state>
1402-
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension</state>
1403-
<state>$PROJ_DIR$\board\CubeMX_Config\Inc</state>
1404-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\ipc</state>
1405-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\CMSIS\Include</state>
14061397
<state>$PROJ_DIR$\.</state>
1407-
<state>$PROJ_DIR$\board</state>
1408-
<state>$PROJ_DIR$\..\libraries\HAL_Drivers</state>
1409-
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension\fcntl\octal</state>
1410-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\epoll</state>
1411-
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\include</state>
1412-
<state>$PROJ_DIR$\applications</state>
1413-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\poll</state>
1398+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\eventfd</state>
14141399
<state>$PROJ_DIR$\..\..\..\include</state>
1400+
<state>$PROJ_DIR$\board\CubeMX_Config\Inc</state>
1401+
<state>$PROJ_DIR$\..\..\..\components\finsh</state>
14151402
<state>$PROJ_DIR$\..\..\..\libcpu\arm\cortex-m3</state>
1403+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\poll</state>
1404+
<state>$PROJ_DIR$\..\..\..\components\drivers\phy</state>
1405+
<state>$PROJ_DIR$\..\libraries\HAL_Drivers</state>
1406+
<state>$PROJ_DIR$\board</state>
1407+
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension</state>
14161408
<state>$PROJ_DIR$\..\..\..\libcpu\arm\common</state>
1417-
<state>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Inc</state>
1418-
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\eventfd</state>
1409+
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers\config</state>
1410+
<state>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Inc</state>
1411+
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\include</state>
1412+
<state>$PROJ_DIR$\applications</state>
1413+
<state>$PROJ_DIR$\packages\CMSIS-Core-latest\Include</state>
1414+
<state>$PROJ_DIR$\..\..\..\components\libc\compilers\common\extension\fcntl\octal</state>
1415+
<state>$PROJ_DIR$\..\..\..\components\drivers\smp_call</state>
1416+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\io\epoll</state>
1417+
<state>$PROJ_DIR$\..\..\..\components\libc\posix\ipc</state>
1418+
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
1419+
<state>$PROJ_DIR$\packages\stm32f1_cmsis_driver-latest\Include</state>
1420+
<state>$PROJ_DIR$\..\libraries\HAL_Drivers\drivers</state>
14191421
</option>
14201422
<option>
14211423
<name>CCStdIncCheck</name>
@@ -2096,6 +2098,9 @@
20962098
<name>$PROJ_DIR$\applications\main.c</name>
20972099
</file>
20982100
</group>
2101+
<group>
2102+
<name>CMSIS-Core</name>
2103+
</group>
20992104
<group>
21002105
<name>Compiler</name>
21012106
<file>
@@ -2150,7 +2155,13 @@
21502155
<name>$PROJ_DIR$\..\..\..\components\drivers\core\device.c</name>
21512156
</file>
21522157
<file>
2153-
<name>$PROJ_DIR$\..\..\..\components\drivers\ipc\completion.c</name>
2158+
<name>$PROJ_DIR$\..\..\..\components\drivers\ipc\completion_comm.c</name>
2159+
</file>
2160+
<file>
2161+
<name>$PROJ_DIR$\..\..\..\components\drivers\ipc\completion_up.c</name>
2162+
</file>
2163+
<file>
2164+
<name>$PROJ_DIR$\..\..\..\components\drivers\ipc\condvar.c</name>
21542165
</file>
21552166
<file>
21562167
<name>$PROJ_DIR$\..\..\..\components\drivers\ipc\dataqueue.c</name>
@@ -2171,10 +2182,10 @@
21712182
<name>$PROJ_DIR$\..\..\..\components\drivers\ipc\workqueue.c</name>
21722183
</file>
21732184
<file>
2174-
<name>$PROJ_DIR$\..\..\..\components\drivers\pin\pin.c</name>
2185+
<name>$PROJ_DIR$\..\..\..\components\drivers\pin\dev_pin.c</name>
21752186
</file>
21762187
<file>
2177-
<name>$PROJ_DIR$\..\..\..\components\drivers\serial\serial.c</name>
2188+
<name>$PROJ_DIR$\..\..\..\components\drivers\serial\dev_serial.c</name>
21782189
</file>
21792190
</group>
21802191
<group>
@@ -2188,9 +2199,6 @@
21882199
<file>
21892200
<name>$PROJ_DIR$\..\libraries\HAL_Drivers\drv_common.c</name>
21902201
</file>
2191-
<file>
2192-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\CMSIS\Device\ST\STM32F1xx\Source\Templates\iar\startup_stm32f103xb.s</name>
2193-
</file>
21942202
<file>
21952203
<name>$PROJ_DIR$\board\CubeMX_Config\Src\stm32f1xx_hal_msp.c</name>
21962204
</file>
@@ -2201,10 +2209,10 @@
22012209
<group>
22022210
<name>Finsh</name>
22032211
<file>
2204-
<name>$PROJ_DIR$\..\..\..\components\finsh\shell.c</name>
2212+
<name>$PROJ_DIR$\..\..\..\components\finsh\msh.c</name>
22052213
</file>
22062214
<file>
2207-
<name>$PROJ_DIR$\..\..\..\components\finsh\msh.c</name>
2215+
<name>$PROJ_DIR$\..\..\..\components\finsh\shell.c</name>
22082216
</file>
22092217
<file>
22102218
<name>$PROJ_DIR$\..\..\..\components\finsh\msh_parse.c</name>
@@ -2222,25 +2230,25 @@
22222230
<name>$PROJ_DIR$\..\..\..\src\components.c</name>
22232231
</file>
22242232
<file>
2225-
<name>$PROJ_DIR$\..\..\..\src\idle.c</name>
2233+
<name>$PROJ_DIR$\..\..\..\src\cpu_up.c</name>
22262234
</file>
22272235
<file>
2228-
<name>$PROJ_DIR$\..\..\..\src\ipc.c</name>
2236+
<name>$PROJ_DIR$\..\..\..\src\defunct.c</name>
22292237
</file>
22302238
<file>
2231-
<name>$PROJ_DIR$\..\..\..\src\irq.c</name>
2239+
<name>$PROJ_DIR$\..\..\..\src\idle.c</name>
22322240
</file>
22332241
<file>
2234-
<name>$PROJ_DIR$\..\..\..\src\klibc\kstdio.c</name>
2242+
<name>$PROJ_DIR$\..\..\..\src\ipc.c</name>
22352243
</file>
22362244
<file>
2237-
<name>$PROJ_DIR$\..\..\..\src\klibc\kstring.c</name>
2245+
<name>$PROJ_DIR$\..\..\..\src\irq.c</name>
22382246
</file>
22392247
<file>
22402248
<name>$PROJ_DIR$\..\..\..\src\kservice.c</name>
22412249
</file>
22422250
<file>
2243-
<name>$PROJ_DIR$\..\..\..\src\mem.c</name>
2251+
<name>$PROJ_DIR$\..\..\..\src\memheap.c</name>
22442252
</file>
22452253
<file>
22462254
<name>$PROJ_DIR$\..\..\..\src\mempool.c</name>
@@ -2261,6 +2269,24 @@
22612269
<name>$PROJ_DIR$\..\..\..\src\timer.c</name>
22622270
</file>
22632271
</group>
2272+
<group>
2273+
<name>klibc</name>
2274+
<file>
2275+
<name>$PROJ_DIR$\..\..\..\src\klibc\kstring.c</name>
2276+
</file>
2277+
<file>
2278+
<name>$PROJ_DIR$\..\..\..\src\klibc\rt_vsnprintf_tiny.c</name>
2279+
</file>
2280+
<file>
2281+
<name>$PROJ_DIR$\..\..\..\src\klibc\kstdio.c</name>
2282+
</file>
2283+
<file>
2284+
<name>$PROJ_DIR$\..\..\..\src\klibc\kerrno.c</name>
2285+
</file>
2286+
<file>
2287+
<name>$PROJ_DIR$\..\..\..\src\klibc\rt_vsscanf.c</name>
2288+
</file>
2289+
</group>
22642290
<group>
22652291
<name>libcpu</name>
22662292
<file>
@@ -2280,48 +2306,57 @@
22802306
</file>
22812307
</group>
22822308
<group>
2283-
<name>Libraries</name>
2309+
<name>POSIX</name>
2310+
</group>
2311+
<group>
2312+
<name>STM32F1-CMSIS</name>
2313+
<file>
2314+
<name>$PROJ_DIR$\packages\stm32f1_cmsis_driver-latest\Source\Templates\iar\startup_stm32f103xb.s</name>
2315+
</file>
22842316
<file>
2285-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc_ex.c</name>
2317+
<name>$PROJ_DIR$\packages\stm32f1_cmsis_driver-latest\Source\Templates\system_stm32f1xx.c</name>
22862318
</file>
2319+
</group>
2320+
<group>
2321+
<name>STM32F1-HAL</name>
22872322
<file>
2288-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cortex.c</name>
2323+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_cec.c</name>
22892324
</file>
22902325
<file>
2291-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio_ex.c</name>
2326+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_gpio.c</name>
22922327
</file>
22932328
<file>
2294-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_rcc.c</name>
2329+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_rcc.c</name>
22952330
</file>
22962331
<file>
2297-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_pwr.c</name>
2332+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_uart.c</name>
22982333
</file>
22992334
<file>
2300-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_dma.c</name>
2335+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_gpio_ex.c</name>
23012336
</file>
23022337
<file>
2303-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_crc.c</name>
2338+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_pwr.c</name>
23042339
</file>
23052340
<file>
2306-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\CMSIS\Device\ST\STM32F1xx\Source\Templates\system_stm32f1xx.c</name>
2341+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_dma.c</name>
23072342
</file>
23082343
<file>
2309-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_uart.c</name>
2344+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_cortex.c</name>
23102345
</file>
23112346
<file>
2312-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal.c</name>
2347+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_rcc_ex.c</name>
23132348
</file>
23142349
<file>
2315-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_cec.c</name>
2350+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal.c</name>
23162351
</file>
23172352
<file>
2318-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_usart.c</name>
2353+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_crc.c</name>
23192354
</file>
23202355
<file>
2321-
<name>$PROJ_DIR$\..\libraries\STM32F1xx_HAL\STM32F1xx_HAL_Driver\Src\stm32f1xx_hal_gpio.c</name>
2356+
<name>$PROJ_DIR$\packages\stm32f1_hal_driver-latest\Src\stm32f1xx_hal_usart.c</name>
23222357
</file>
23232358
</group>
23242359
<group>
2325-
<name>POSIX</name>
2360+
<name>utestcases</name>
23262361
</group>
23272362
</project>

0 commit comments

Comments
 (0)