Debugging from Internal Flash for MCF5282

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

Debugging from Internal Flash for MCF5282

1,370 次查看
CHRamesh
Contributor I
Hi,
I have a program which is successfully running from Internal flash of MCF5282.
For testing purpose, I want to debug my code while it is running from internal flash like we do it for RAM.
Can anyone tell me how to do this?
标签 (1)
0 项奖励
回复
1 回复

657 次查看
ChrisJohns
Contributor I
You cannot debug from flash the way you can for RAM. Typically when debugging from RAM the instruction is replaced with a HALT instruction when you set a break point, step over etc. This will not work with flash.

A manual solution is to use the step instruction command and hardware breakpoints. If using BDM a hardware breakpoint can be set on a location in flash and the processor will stop. How-ever on the 5282 there is only 1 hardware break point.

With the BDM open source project's gdbserver I added a '-B' option that causes all breakpoints to be hardware break points. This is nice on some of the newer devices with more than one hardware breakpoint. You can debug flash almost like it is RAM with limited breakpoints.
0 项奖励
回复