Can't hit breakpoint if the MAIN function in RAM

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User12824
Level 1
Level 1
Hi,

I am using Dave 4 and XMC1300 boot kit to run XMC1300 Blinky example code from Infineon site. It is working and the breakpoints got hit properly if the Main function in the flash.

But if the main is at RAM location by using "void main(void) __attribute__ ((section (".ram_code")));", the breakpoints set in the Main will not be hit.
The GCC optimization level setting is at "Optimize for debugging (-Og) for both above situations.

Appreciate if any advice!
Mark
0 Likes
2 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

I could verify your observation. We are looking into it. One workaround is to set a breakpoint at startup_XMC1100.S before going into main
ldr r0, =main
-> blx r0

After this initial breakpoint, further breakpoints in main function located in RAM appears to work.

Regards,
Jesus
0 Likes
User12824
Level 1
Level 1
Thanks and I will check it.
0 Likes