cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Advisor
Advisor
750 Views
Registered: ‎10-10-2014

SDK 2018.2 - system debugger refuses to stop at main

Jump to solution

Using SDK 2018.2 and Zynq 7Z020 device

Although I enabled 'stop at main' in the tab 'Application', my processor just starts running when I start the system debugger session. I can see my code works fine, because leds flash, and uart spits out expected text.

Screenshot 2019-07-25 at 17.28.49.png

Screenshot 2019-07-25 at 17.31.06.png

If I hit debug the cpu starts running immediately:

Screenshot 2019-07-25 at 17.31.50.png

If I hit the pause button, I get :

Screenshot 2019-07-25 at 17.32.01.png

so I can see there's some call stack and disassembly, but SDK seems to have lost the link to my source files/code ... 

I've attached my SDK.log file in case that might help...

I tried unchecking - rechecking the flag 'stop at main', but without success. I tried to create a new application project (hello world), same problem.

This problem seems not to be new looking at some other forum posts, I'd like to know if there's a way to fix this in 2018.2

Could this be some hidden file that is wrong/corrupt/missing? I'm trying to recreate my sdk project from a git repo, maybe it has something to do with a file not being checked in, or a file that shouldn't be checked into git, I'm not sure. In my 'origin' repo, I can debug/step through my code ... 

here's a link to my .gitignore file in another (recent) post

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Advisor
Advisor
659 Views
Registered: ‎10-10-2014

I finally found the solution myself ... I'm using SmartLynq as debugger, and it is said nowhere in the manual that one needs to turn on a small checkbox ...: 'use symbol server' 

SmartLynq symbol server.png

I created a more detailed post here, that describes all symptoms you get, so other people can benefit from it, and hopefully not waste the time that I did

** kudo if the answer was helpful. Accept as solution if your question is answered **

View solution in original post

0 Kudos
5 Replies
Highlighted
Scholar
Scholar
733 Views
Registered: ‎04-13-2015

@ronnywebers 

May be this is what you are encounterng --- depending on the option settings of the linker it can in-line functions and when it does so it's not possible to put a breakpoint on the in-lined functions.

0 Kudos
Highlighted
Advisor
Advisor
708 Views
Registered: ‎10-10-2014

@ericv I'm not sure if that is the case ... any idea where I can find the option to have all functions inlined?

I checked the application project's properties -> compiler and linker settings:

right click on the app project -> properties -> C/C++ build -> settings -> Tool settings -> ARM v7 gcc compiler :

-Wall -O0 -g3 -c -fmessage-length=0 -MT"$@" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -I../../sncp_bsp/ps7_cortexa9_0/include

right click on the app project -> properties -> C/C++ build -> settings -> Tool settings -> ARM v7 gcc linker :

-mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -Wl,-build-id=none -specs=Xilinx.spec -Wl,-T -Wl,../src/lscript.ld -L../../sncp_bsp/ps7_cortexa9_0/lib

under linker -> General I did find 'omit all symbol information' (-s option), but this is not checked so ...

not sure what the problem is here ... it looks like SDK cannot find it's debug info ... I thought this info is extracted from the .elf file somehow, but I'm not an expert in that. 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Highlighted
Advisor
Advisor
705 Views
Registered: ‎10-10-2014

I checked the .elf file (objdump --dwarf=decodedline sncp.elf), it clearly contains debug info that links addresses to source code files and lines. So the info is there, only SDK doesn't use/read it... not the cause must be found in that direction I think:

Screenshot 2019-07-26 at 12.12.58.png

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Highlighted
Scholar
Scholar
691 Views
Registered: ‎04-13-2015

@ronnywebers 

There a many flags that could in-line. They are described in:

https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

In-line optimization is unlikely as your command line doesn't use any of them

0 Kudos
Highlighted
Advisor
Advisor
660 Views
Registered: ‎10-10-2014

I finally found the solution myself ... I'm using SmartLynq as debugger, and it is said nowhere in the manual that one needs to turn on a small checkbox ...: 'use symbol server' 

SmartLynq symbol server.png

I created a more detailed post here, that describes all symptoms you get, so other people can benefit from it, and hopefully not waste the time that I did

** kudo if the answer was helpful. Accept as solution if your question is answered **

View solution in original post

0 Kudos