Andes Workshop

It is currently Thu Mar 28, 2024 10:25 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: MCU program debug
PostPosted: Thu Mar 01, 2012 4:54 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
如果我們要debug ROM或是flash,
可以使用MCU Program debug。

Andesight裡的Debug分成2種,分別為
C/C++ application及MCU Program。
它們的差異有幾點:
(1)C/C++ application的流程:load code,
設定temp breakpoint在main (也可以改到_start),
load code之後continue,停在main。
(2)MCU Program debug是比較彈性的,
可以下各種gdb的command。
因為C/C++ application debug一定會load code,
所以debug ROM或是flash建議採用MCU Program debug。

以下說明MCU Program debug的使用流程。

(1) 首先要先燒code,選擇flash burner-->real board
Attachment:
p2.gif
p2.gif [ 14.91 KiB | Viewed 6913 times ]


(2)將要用的code燒進去。
Attachment:
p1.gif
p1.gif [ 21.11 KiB | Viewed 6913 times ]



(3)第1次使用MCU Program debug要設定,
Debug As-->Debug Configuration
Attachment:
p3.gif
p3.gif [ 20.5 KiB | Viewed 6913 times ]


(4)在MCU Program上double click,會出現如下圖的程式名字。
右邊有選項可以選。

Attachment:
p4.gif
p4.gif [ 19.82 KiB | Viewed 6913 times ]


(5)在此我勾選Reset and hold,使得MCU Program debug在一開始就停在0。
勾好之後,按下Debug可以啟動。
Attachment:
p5.gif
p5.gif [ 29.62 KiB | Viewed 6913 times ]


(6)如下圖,$pc值在0
以下的debug和一般也相同,可以單步執行。
只是HW breakpoint的數量不要超過user的design。
Attachment:
p6.gif
p6.gif [ 30.42 KiB | Viewed 6913 times ]


(7)下次如果還要啟動MCU debug,
不用再到Debug configuration。只要按MCU Program即可。
Attachment:
p7.gif
p7.gif [ 24.64 KiB | Viewed 6913 times ]


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group