Unable to use xmd or mb-gdb with microblaze cycle accurate simulator target
Subject: Unable to use xmd or mb-gdb with microblaze cycle accurate
simulator target
Hello:
I am trying to use gdb and xmd to connect to the cycle-accurate
simulator target on microblaze but have been quite unsuccessful. Here
are the steps followed this far:
1) Compiled code with ‘No optimization’ and ‘-xlmode-executable’
option set in XPS studio
2) Chose ‘Simulation’ under ‘Debug->XMD Debug options’
3) Launched XMD from XPS and not from command line
4) Launched GDB which displayed the source program &
5) Within gdb set these options:
a. Target Settings: break point at ‘main’ and exit and also set
break points else where within the code
b. Connect to target & download
c. ‘Run Method’->’Run’
6) With these options set the ‘Run’ button was hit and the program
stalled at _start
7) Upon ‘continue’ xmd crashes with a windows message that says ‘xmd
encountered a problem…’
So I figured that since xmd is the interface for gdb I’d try stepping
through xmd shell instead. These were the commands tried out manually
in xmd shell.
1) connect mb sim
2) xload xmp system.xmp
3) xload mhs system.mhs
4) xload mss system.mss
5) dow executable.elf
6) bps 0x00000bf8 ïƒ* setting software break point
7) con or stp 10 or run ->xmd crashes and windows displays an error
message similar to the previous scenario
The system contains a UART peripheral and from what I understand
simulation of peripherals is not supported. But could that be the
cause of the crash? Shouldn’t it still be possible to step through the
initial set of instructions at least?
Also,I am able to use similar commands to connect and step through the
Virtual Platform target and successfully display things on the virtual
uart terminal – unfortunately trace isn’t supported for microblaze VP.
So in summary here are my queries:
1) What am I missing to successfully use xmd/gdb to connect to the
cycle-accurate simulator target on microblaze? Is a opb_mdm module
required? That isn’t present in my system and even with that I had no
success.
2) Is it possible to obtain a trace/profile information using this
approach? What I need is the number of clock cycles consumed.
Any guidance and tips provided would be very much appreciated since it
would help me pace up my simulation efforts.
Thanks
Prasad Subramanian
Graduate Student
Utah State University
|