您的位置:首页 > 其它

RT-Thread - 笔记1:使用STM32F0 官方BSP跑起来

2017-02-09 22:45 375 查看
这里使用的板子是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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: