Andes Workshop http://forum.andestech.com/ |
|
使用gdb script在板子上連續跑2個程式 http://forum.andestech.com/viewtopic.php?f=13&t=58 |
Page 1 of 1 |
Author: | cindy [ Thu Apr 14, 2011 10:40 am ] |
Post subject: | 使用gdb script在板子上連續跑2個程式 |
gdb script類似Linux裡的shell script, 可以使gdb執行多個指令。 比方說下面這個例子。 Code: target remote :9901 file hello1.adx load b empty continue clear targetresetrun file hello2.adx load b empty continue quit 執行步驟: (1)打開ICEman Attachment: p1.gif [ 4.15 KiB | Viewed 14071 times ] (2)執行nds32le-elf-gdb.exe -x run_program.txt Attachment: p2.gif [ 15.69 KiB | Viewed 14071 times ] (3)可以看到執行完2個程式 Attachment: p3.gif [ 14.91 KiB | Viewed 14071 times ] 下面的程式碼大家可以試試。 這2個*.adx檔是以V2 toolchain所編譯,run在N903A及N1033A。 請大家在實驗時,要依你的板子的toolchain為準,重新編譯程式。 Attachment: 裡面有2個txt,其中1個是AndeSight v1.4用, 另1個是BSP v300使用, 差別在AndeSight v1.4支援monitor reset target指令。 BSP v300支援targetresetrun。 這2個都是一樣的意思,reset板子之後,再跑boot code。 clear表示把中斷點清掉,這樣子才不會影響第2個程式的執行。 |
Page 1 of 1 | All times are UTC + 8 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |