RT-Thread - 筆記1:使用STM32F0 官方BSP跑起來


這裏使用的板子是vcc-gnd出品的小開發板,板子外形是


原理圖截取如下:








查看這個debug串口,發現沒有命令可用(按tab鍵)

msh >
RT-Thread shell commands:

打開rtconfig.h,把以下兩行去掉註釋即可

#define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION

debug串口中,重新按tab鍵



msh >
RT-Thread shell commands:
version          - show RT-Thread version information
list_thread      - list thread
list_sem         - list semaphore in system
list_timer       - list timer in system
list_device      - list device in system
ps               - List threads in the system.
time             - Execute command with time.
free             - Show the memory usage in the system.
help             - RT-Thread shell help.

其中幾個使用如下



msh >list_device
device   type                 ref count
-------- -------------------- ----------
uart2    Character Device     1       
uart1    Character Device     2       
msh >list_thread
 thread  pri  status      sp     stack size max used   left tick  error
-------- ---- ------- ---------- ---------- ---------- ---------- ---
wifi     0x14 suspend 0x00000084 0x00000100 0x0000009c 0x00000014 000
led      0x14 suspend 0x0000007c 0x00000100 0x0000007c 0x00000014 000
tshell   0x19 ready   0x0000008c 0x00000400 0x00000190 0x00000008 000
tidle    0x1f ready   0x00000050 0x00000100 0x00000050 0x0000001b 000
msh >ps
 thread  pri  status      sp     stack size max used   left tick  error
-------- ---- ------- ---------- ---------- ---------- ---------- ---
wifi     0x14 suspend 0x00000084 0x00000100 0x0000009c 0x00000014 000
led      0x14 suspend 0x0000007c 0x00000100 0x0000007c 0x00000014 000
tshell   0x19 ready   0x0000008c 0x00000400 0x00000190 0x00000004 000
tidle    0x1f ready   0x00000040 0x00000100 0x00000050 0x00000012 000
msh >list_sem
semaphore v   suspend thread
--------  --- --------------
shrx      000 0
heap      001 0
msh >time
msh >help
RT-Thread shell commands:
version          - show RT-Thread version information
list_thread      - list thread
list_sem         - list semaphore in system
list_timer       - list timer in system
list_device      - list device in system
ps               - List threads in the system.
time             - Execute command with time.
free             - Show the memory usage in the system.
help             - RT-Thread shell help.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章