External flash breakpoints

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

External flash breakpoints

461 Views
dnfuss1
Contributor I

Hi!

I'm trying to get debugging working on a K60 based-system, and it's proving harder than I expected. I'm using Segger's Jlink plus probe with their Ozone debugger. Essentially, the system consists of a K60 with an external CFI flash device. I have some initialisation code running in the K60's internal flash, which finally jumps to the main application code in external flash.

The bootloader code runs fine in the debugger, and I am able to use both hard and soft/flash breakpoints without any difficulty. I am also able to halt and run the code within the main application. The difficulty comes when Jlink attempts to modify the external flash during debugging (e.g setting breapoints), at which point I see '1 over 0' programming errors or 'failed to identify CFI device' amongst other messages.


I've been assuming this is an issue with Jlink, but I'm wanting to see if anyone here has experience of something similar which was ultimately down to a configuration issue on the target device- For example, is there anything that could be set during initialisation that would interfere with Jlink's ability to access external flash during debugging (LMEM caching perhaps)?? Incidentally, I am able to get Jlink to write the application code to external flash at the start of the debug session, the problem only manifests itself once the initialisation routine has run and execution is in ext flash.

I'd be very grateful for any advice/suggestions.

David

0 Kudos
1 Reply

442 Views
FelipeGarcia
NXP Employee
NXP Employee

Hi David,

On most Cortex-M3 and M4 devices, hardware breakpoints cannot be used on external memory. Segger offers J-Link software additional feature, called Unlimited Flash Breakpoints that can help you with this.

According to Segger's pricing webpage J-Link PLUS includes J-Link Unlimited Flash Breakpoints in the software package so maybe you need to activate the license to get it working.

I highly recommend you to contact Segger support to help you implement this feature properly.

Best regards,

Felipe

0 Kudos