This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Breakpoints not working in C code, only in assembly?

I am running some example program in ARM Development Studio using FVP (fixed virtual platforms) simulator for A53. 

All is OK, I can run the app.

However, the problem is the breakpoints: they don't work in C code, the work only in .S files assembly. 

What could be the problem? 

Model parameters are -C bp.secure_memory=false -C cache_state_modelled=0. 

Parents
  • Hi Danijel,

    The different exception levels (ELx) are essentially different (but overlapping) memory spaces.

    As Stephen mentioned above, the solution is to load the debug symbols (you do not need to reload the image itself) to the necessary EL level, which is done by the below command (or from the Load menu item in the Debug Control pane).

    Note how EL1N:0 is specified as the 'offset' - this means it will be loaded to EL1N no matter what EL level the core happens to be in when the command is executed:

    add-symbol-file "${workspace_loc:/startup_Cortex-A53x1_AC6/startup_Cortex-A53x1_AC6.axf}" EL1N:0


    You can see this being set in the default debug configuration for the Cortex-A53 example you are using:



    The only other possible cause I can think of may be that your main.c is not compiled for debug (-g),

Reply
  • Hi Danijel,

    The different exception levels (ELx) are essentially different (but overlapping) memory spaces.

    As Stephen mentioned above, the solution is to load the debug symbols (you do not need to reload the image itself) to the necessary EL level, which is done by the below command (or from the Load menu item in the Debug Control pane).

    Note how EL1N:0 is specified as the 'offset' - this means it will be loaded to EL1N no matter what EL level the core happens to be in when the command is executed:

    add-symbol-file "${workspace_loc:/startup_Cortex-A53x1_AC6/startup_Cortex-A53x1_AC6.axf}" EL1N:0


    You can see this being set in the default debug configuration for the Cortex-A53 example you are using:



    The only other possible cause I can think of may be that your main.c is not compiled for debug (-g),

Children