AnsweredAssumed Answered

Breakpoints in SDRAM

Question asked by Simon Canins on Jan 31, 2018
Latest reply on Feb 13, 2018 by Simon Canins

Hi,

I am using the JLink to debug my LPC4330. The code is mainly in SDRAM. The ResetISR() enables the code and copies it from the SPIFI to SDRAM.

 

Now the problem is:

The jlink debugging works nicely, but fails to start debugging if a breakpoint in SDRAM is created.

 

I get this error message right when it should normally stop at main():

 

Error in final launch sequence
Failed to execute MI command:
-exec-continue
Error message from debugger back end:
Warning:\nCannot insert breakpoint 3.\nCannot access memory at address 0x2800ab44\nError in final launch sequence
Failed to execute MI command:
-exec-continue
Error message from debugger back end:
Warning:\nCannot insert breakpoint 3.\nCannot access memory at address 0x2800ab44\n

Seems that is quite natural if it tries to set the breakpoint before the SDRAM is initialized...
For older versions using the RedProbe+ or Link2 it worked like this:
The IDE also tried to set the breakpoints, also failed but silently.
To make the breakpoints work, I just had to put a breakpoint into SPIFI right after the SDRAM was initialized.
The IDE then obviously suceeded to set the SDRAM breakpoints silently.
So the downside of this solution was that there were 2 breakpoints to pass at launch, one in the SPIFI and then at main().
Not perfect, but it worked.

With the MCUxpresso this stopped working. It sometimes works with the CMSIS debugger, but not always.
It always fails with the Jlink.

Any suggestion on how to get it working?

Thanks,

Simon

Outcomes