Debugging from Internal Flash for MCF5282

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

Debugging from Internal Flash for MCF5282

991 Views
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?
Labels (1)
0 Kudos
1 Reply

278 Views
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 Kudos