setting breakpoints with IAR in parallel flash

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

setting breakpoints with IAR in parallel flash

905 Views
ryanlush
Contributor IV

I have a rogue task writing to some parallel flash on the FlexBus. Is there a way for me to set a breakpoint when it writes to a specific address in parallel flash? I am unable to set breakpoints in code when I am running out of parallel flash so I'm not sure how to set a breakpoint. Honestly I don't think I know how to do it in flash or ram either so any help would be appreciated.

Labels (1)
Tags (2)
0 Kudos
1 Reply

780 Views
dereksnell
NXP Employee
NXP Employee

Hi Ryan,

The debugger hardware in Cortex-M devices does enable data breakpoints, when an address range is accessed. And IAR supports creating data breakpoints, like the screenshot below.

But if you are writing to external flash, you are using a driver, and the core may not see an access to that specific address in flash. Depends on how the flash is programmed/erased. In that case, your flash address is passed to the driver to do the programming. I would add a line of code in the driver to test the address, and see if it is in the range you are concerned about. Then add a code breakpoint at that line of code, so you halt whenever the app tries to write to that address.

Best regards

Data breakpoint.jpg

0 Kudos