1.下载
https://www.rt-thread.org/download.html#download-rt-thread-nano
2.清除多余文件
保留如下tree
├─bsp
├─components
│ └─finsh
├─include
│ └─libc
├─libcpu
│ └─arm
│ └─cortex-m3
└─src
bsp
board.c、rtconfig.h
components
finsh 全保留
include
libcpu
arm
cortex-m3
cpuport.c、context_rvds.S(根据需要保留对应板子的启动文件)
src 全保留
3.根据需要裁剪RTT功能
在rtconfig.h文件
4.注释重复定义的函数
/* stm32fxx_it.c */ 使用CUBEMX生成基于HAL库
SysTick_Handler
PendSV_Handler
HardFault_Handler