UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Participant sktpin
Participant
161 Views
Registered: ‎09-11-2018

Xilinx SDK - Debug BSP source

Jump to solution

I am debugging a MicroBlaze project, and get stuck in XSpi_Transfer.
To see why, I'd like to debug, i.e. step through, the library code.

I found this thread:
https://forums.xilinx.com/t5/Embedded-Development-Tools/Xilinx-SDK-IDE-Enable-Debug-With-BSP-Sources/m-p/751507#M41251

It mentions to change the optomization level for the whole BSP.
That would then not fit into the memory anymore, and I can't currently easily increase it.

So I used GCC __attribute__ optimization to set ot to level 0, only for the XSpi_Transfer function.

Now I am debugging, but it is still showing only the disassembly, not the C source code.

How can I step through the C source code?

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
102 Views
Registered: ‎11-09-2015

Re: Xilinx SDK - Debug BSP source

Jump to solution

HI @sktpin 

You might want to refer to AR#69084 

Basically go into the BSP settings and add the option -g to the extra compiler flags option. No need to set the optimization level to 0

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
2 Replies
Moderator
Moderator
103 Views
Registered: ‎11-09-2015

Re: Xilinx SDK - Debug BSP source

Jump to solution

HI @sktpin 

You might want to refer to AR#69084 

Basically go into the BSP settings and add the option -g to the extra compiler flags option. No need to set the optimization level to 0

Regards


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Participant sktpin
Participant
89 Views
Registered: ‎09-11-2018

Re: Xilinx SDK - Debug BSP source

Jump to solution

Ah, right! Thanks. For anyone also reading this & with the problem of scratching at the program memory boundaries: "-g1" instead of "-g" will compile it with "minimal debug information", I didn't find what exactly that entails vs. the default, but it made the difference for me wrt the program fitting in the memory vs. not, and I can step through it (maybe not perfectly everywhere, haven't tried too extensively yet).