Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dzar
New Contributor I
1,067 Views

Proper flow for debugging code loaded from ROM (QSPI)

I have a board where I loaded my code into QSPI for loaded by the HPS at boot time. This works. But when I connect with the debugger, and load my symbols for that code, I cannot set/hit breakpoints, step code properly, etc.

 

What I do is, using DS5, "connect-only" with the debugger, pause the processor, use file/symbol-file to load my symbols, and then set a breakpoint in my code that will absolutely be hit (it prints a message and I can make that message print).

 

file "path/to/my/file.axf" 0

 

is what I do (and loadfile with the same binary will load my program and run it just fine).

 

Am I missing something?

 

Yes, the .axf file has debugging symbols in it. Remember, that's the same file I can "loadfile" and works. But now my code was running out of QSPI so I can't do that, again.

 

0 Kudos
5 Replies
Fawaz_J_Intel
Employee
110 Views

Hello sir, We dont have any tutorial regarding that. I will check with our internal engineering department and let you know the updates. Thanks
Fawaz_J_Intel
Employee
110 Views

Hello sir, I have found an old post regarding booting from QSPI and executing in it (XIP). no updated on yet. It might help you to define the required flow, along with the debugging script needed for debugging. The description of the flow: https://www.intel.com/content/www/us/en/programmable/documentation/hco1433528108894/hco1433527902037... The design example: https://fpgawiki.intel.com/wiki/Cyclone_V_QSPI_XIP_Example_Design Hope this might help.
Dzar
New Contributor I
110 Views

This is, essentially, what I'm doing. It simply doesn't work. The symbols are loaded but setting a break point in a piece of code I know is getting executed (as it has output to the serial port and I see that output) will never get hit: software or hardware breakpoint. I'll beat on ARM. Maybe they will help? I think this is a DS-5 issue, after all.

Fawaz_J_Intel
Employee
110 Views

Hello sir, Try with them, if you dont see any help let me know. Thanks
Dzar
New Contributor I
110 Views

The solution, it seems, is to set the memory type being loaded. In my case that was something like

 

add-symbol-file "filename.axf" s:0x0

 

The "s:" is what's important.

Reply