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:
- Open CodeWarrior 7.2 and create a new project (debugger is unavailable otherwise)
- Select CF 5206E, default settings
- Menu=>INTERNAL_RAM settings (Alt+F7)
- Debugger=>Debugger Settings: uncheck 'Stop on application launch' (will probably choose Program/Default Language Entry Point when debugging?)
- Remote Debugging: set Connection to the appropriate setting for Univelop device (a GDI plugin), leave 'Download OS' unchecked.
- CF Debugger Settings: uncheck 'Use Target Initialization File', 'Use Memory Configuration File' (?), everything under 'Program Download Options'
- CF Reset: uncheck 'Initialize target after Reset' (unsure whether to fetch SP and PC, or select 'Do not set...')
- Apply settings
- Physically connect to BDM header of unpowered target.
- Menu=>Debug=>Connect (unsure of any dialogs/options/intermediate steps that might appear when BDM is physically connected)
- Menu=>Debug=>ColdFire=>Load/Save Memory (again, unsure of dialogs/options/next steps)
This is my first time working with an older version of CW, so I would greatly appreciate comments and advice!