setting breakpoints with IAR in parallel flash

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

setting breakpoints with IAR in parallel flash

964 次查看
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.

标签 (1)
标记 (2)
0 项奖励
1 回复

839 次查看
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 项奖励