Dummy Driver
- ขั้นตอน 1
- สร้าง Project ใหม่ ให้ชื่อ ว่า
dummy-driver - กด เลือก RT-Thread Setting จะเป็นการเปิด config ในส่วน RT-Thread setting

- ในส่วนของ component Service เลือก Ulog icon และ กด Configs

-
copy code
hal_entry.cจาก Folder /ex_02 มาใช้ โดย ทำการ Copy ใส่ไว้ในsrc- จากนั้น Build Project แนะนำให้ clean ก่อนก็ดี - หากไม่มี Error ก็ให้ทำการ Flash Download ไปยัง Board - Connect Serial ด้วย Terminal เหมือนเดิม - พิมพ์คำสั่งเรียกใช้งาน function ใน msh>
ทดสอบคำสั่งเบื่องต้น
- msh> เป็นเสมือน Shell ของ RT-Thread ที่จะรอรับการสื่อสารจาก user
- ทดสอบคำสั่ง ps, help, free
msh >ps rt_thread_ thread pri status sp stack size max used left tick error ---------- ------------ --- ------- ---------- ---------- ------ ---------- --- 0x22007ec8 tshell 20 running 0x000000e4 0x00001000 15% 0x00000007 OK 0x22000664 tidle0 31 ready 0x0000005c 0x00000100 54% 0x0000000e OK 0x22000a90 timer 4 suspend 0x0000007c 0x00000200 24% 0x00000009 OK 0x22007370 main 10 suspend 0x000000cc 0x00000800 15% 0x00000012 EINTRPT msh >free memheap pool size max used size available size ------------ ---------- ------------- -------------- sdram 33554432 48 33554384 heap 888288 7560 880728 msh >help RT-Thread shell commands: drv_test_app - enable test drv app clear - clear the terminal screen version - show RT-Thread version information list - list objects help - RT-Thread shell help. ps - List threads in the system. free - Show the memory usage in the system. pin - pin [option] reboot - Reboot System