Hi guys,
I was debugging a bare metal program in DS-5 with Cortex-A15 FVP. Debugger works pretty well for the first half every time when I debug the program. But then loses source highlight on execution line. The program is alive when this happens, and still able to carry on, the only problem is no code highlight. Anybody has ideas about this.
Thanks
Below the the output from "Commands" panel in DS-5.
Execution stopped in MON mode at S:0x000101D4S:0x000101D4 259,0 mcr p15, 4, r0, c12, c0, 0 /* HVBAR */waitstepExecution stopped in MON mode at S:0x000101D8S:0x000101D8 261,0 msr cpsr_c, #0xd3 <== still ok with line infowaitstepExecution stopped in SVC mode at N:0x000101DCN:0x000101DC MOV r1,#0x111 <== no line info from this pointwaitstep
Hi fshark,
Sorry to hear you're having an issue with source highlighting. Could you tell me which version of DS-5 you're using? The latest version is 5.28.
Kind regards,
Elan
Hi again,
Another question: Have you only seen this when stepping into/out of secure code?
Hi Elan,
Thanks for helping me. It's 5.28.0, build number: 5280120.
That's a good question. I think you are right.
Cause I wrote another quick and simple test doing the same thing just switching mode, not leaving the secure world. In this case, it worked well.
I'll do another quick test and get you back soon.
Thanks :)
You are right, if I entering svc from mon in secure world, there's no problem. Or execution line will not be highlighted anymore from that point on.
Hello - the fact that you move from Secure to Non-Secure is critical. You should also load the symbols to the Non-secure memory space. This is most easily done by adding the below command in the "Execute Debugger Commands" section of the debug configuration setup pane, so that it happens automatically when you connect the debugger. You can also do it manually from the command line at any point during your debug session.
add-symbol-file <your_image.axf> N:0x0
Hope this helps!
Hi Ronan,
That works pretty well. Except has to load symbol files manually every time the mode switched. But it completely solved my problem. Thanks a lot. :-)
The add-symbol-file command does not remove the original image (and debug information) loaded to secure space, unlike the file or loadfile commands.
You can safely add this command to execute every time you connect, either within a script, or just as a verbose command like below, to save the inconvenience of manually loading.
Got it. It works. Thanks Ronan.