USBDM
V4.12
|
USBDM does not support the automatic programming of Coldfire V2 - V4 devices as the programming algorithms required are too varied between different devices. This situation is no different from the arrangement that applies to the other Codewarrior supported BDM interfaces.
Codewarrior Eclipse allows the creation of Flash programming tasks which may then be automatically executed prior to debugging a device. The following describes the setting up of a such a task for a MCF52233.
Open the Flash Programmer as shown:
Click on the Green Plus to add a new task
Choose a suitable name for the Task and complete the required details.
The dialogue that opens allows the selection of target device and the necessary Flash programming Actions to be scheduled as a sequence of steps that will be automatically carried out.
Click Done to close this dialogue when finished.
Select the Add Erase/Blank Check Action from the Add Action drop-down
The following actions selected are added to the original dialogue.
The final step in setting up the Flash programmer is determining a suitable location for the Target RAM buffer required to hold the Flash Programming code and Flash data buffer. Unfortunately on the Coldfire chips this is movable and depends upon how the target is configured.
The easiest way (that I've found) to determine a suitable location is to inspect the linker configuration for the project being debugged.
Look under Project_Settings/Linker_Files for the appropriate .lcf file, in this case MCF52232_Internal_Flash.lcf.
Look for the Memory section as shown and note the settings for the two (RWX) sections. You can choose a suitable RAM buffer from these two.
In this case I've used all the available RAM from the start of the first section 0x20000000 for the combined size of 0x8000 since the two sections are contiguous.
Now that we have created a programming task we need to set up the debug launch configuration so that this task runs automatically at the start of a debugging session.
Open the debug launch configuration using the Run->Debug Configurations... menu item.
Locate the launch configuration associated with the Flash target as shown:
Unselect the Perform Standard Download checkbox and select the Execute Task checkbox.
Click on the Add... button to open a new Download Task dialogue.
Select the Target Task checkbox and select the programming task created earlier. Unselect Execute on successive Runs as it is only necessay to program the device once at the start of the debugging sessions - Not every time the session is restarted.
Close the dialog using the OK button and confirm that the task has been correctly added to the Debugger tab.