I have a legacy device with a ColdFire v2 (MCF5206) chip and a BDM header. I am using CodeWarrior v7.2 Special Edition and a Univelop ColdFire BDM interface (compatible with CF v2 according to specs, and apparently based on the USBDM designs). I need to be able to do the following things: 1) connect to the legacy device and read existing memory, ideally dumping a complete binary from internal+external SRAM to the PC as a backup; 2) debug existing code on the device--or alternatively in a VM--and potentially do a binary delta in code/data to repair a glitch; and 3) overwrite existing code with the backup binary from (1) or with the repaired binary from (2). I'm not sure if this last goal is possible with the Special Edition since the binary is >128kB, but I'm thinking it could be done it chunks if necessary. I need to do all of this without the original source code in CodeWarrior; working in assembly is fine as long as it's possible.
I want to emphasize that it is CRITICAL that I not initialize, overwrite, or download any data to my target, at least initially before (3) above. I do not have the source code or complete binary to restore if things go wrong, which is the main reason I need to do this to begin with. I want to connect as passively as possible, as if in read-only mode.
I don't have any other CF devices to experiment with first, and because I can't risk losing the existing code, I have not yet attempted to connect to the board via BDM. I need to be as certain as possible that my CW configuration and actions will not modify it in any way, so I would greatly appreciate it if someone could confirm that what I want to do is possible and validate/comment on my configuration steps below before I attempt anything.
It is most important for me to dump memory to get a backup, so that's my first goal. (If it works, I will move on to debugging.) My planned steps are:
This is my first time working with an older version of CW, so I would greatly appreciate comments and advice!
Hi Nathan,
If you are not familiar with CodeWarrior 7.2 you can also use CodeWarrior 10.6 and take a look to the below posts created by our colleague Erich Styger:
https://mcuoneclipse.com/2012/10/10/attach-connect-download/
https://mcuoneclipse.com/2012/05/04/dump-my-device-memory/
The first one explains how to connect to a running target without programming it using the "Connect" option in CodeWarrior:
The second one shows how to dump the memory of the device using the "Memory view" once you have connected to the device.
Regarding the special edition limit of 128Kb, this limit is only for the compiler and debugger, you can use the flash programmer to overwrite the existing code with the repaired binary.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer
Thanks Carlos! Unfortunately the BDM interfacing device I have isn't compatible with the Eclipse-based versions of CodeWarrior (and I'm having trouble getting it to function with 7.2 for that matter), but the information you've provided is still valuable. It looks like debugging even in assembly probably won't be possible without the source, but I should at least be able to dump memory and maybe disassemble the thing, assuming I can get the BDM device to work.
Hi Nathan,
It should be possible to debug in assembly after connecting to the device.
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer