Breakpoints in SDRAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Breakpoints in SDRAM

806 Views
simoncanins
Contributor I

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

0 Kudos
2 Replies

655 Views
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Simon,

Are you using the on-bard debugger with the J-link firmware or an external j-link programmer?

Thanks in advance!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos

655 Views
simoncanins
Contributor I

Hi Carlos,

I used a real jlink as well as a link2 with jlink firnware.

My current workaround is to first click the disable all breakpoints button, then start the debugger and enable all breakpoints again when it stops in main. Interestingly the main IS in sdram. For some reason this breakpoints is set properly...

Thanks,

Simon

0 Kudos