Set Up ColdFire Erase Task

Note: This tutorial assumes that you have already built a ColdFire project with the name ColdFire_test. It also assumes that you have previously created other tasks, so that the Target Tasks view is visible. If it is not visible, perform the steps in the Working with Flash Programmer topic to open the Target Tasks view.

After you have connected an MCF5213-based evaluation board to the workstation with a USB cable:

  1. Go to the Target Tasks view in either the C/C++ or Debug perspective.
  2. Right-click on this view and select New Task.

    The Create New Target Task wizard appears.

  3. In the Task Name text box, enter the name of the target task. For example, enter Erase portion of Flash.
  4. From the Run Configuration drop-down list, select a run configuration.
  5. From the Task Type drop-down list, select Flash Programmer for ColdFire V234 from the drop-down listbox.

    The Create New Target Task wizard should appear.

    Figure 1. Task Settings for Erasing Flash on MCF5213
    Task Settings for Erasing Flash on MCF5213
  6. Click Finish to create the task.

    The <target> Flash Programmer Task editor window appears.

    Figure 2. <target> Flash Programmer Task Editor Window
    <target> Flash Programmer Task Editor Window
  7. Click Add Device.

    The Add Device dialog box appears.

    Figure 3. Add Device for ColdFire Derivative
    Add Device for ColdFire Derivative
  8. Scroll through the list of microcontroller derivatives and select CFM_MCF5213.
  9. Click Add Device.
  10. Click Done.

    You return to the <target> Flash Programmer Task editor window, with the selected device appearing in the Flash Devices group.

  11. Select the Erase / Blank Check action from the Add Action drop-down list.

    The Add Erase / Blank Check Action dialog box appears. It displays the flash devices and their addresses.

  12. In the Sectors group, click on the desired start address of the flash memory, then shift-click on the end address to select all of the sectors of Flash memory you want erased.
    Figure 4. Add Erase / Blank Action Dialog Box for ColdFire
    Add Erase / Blank Action Dialog Box for ColdFire
  13. Click Add Erase Action.
  14. Click Done.
    Note: To erase of all Flash memory at the same time, check Erase All Sectors Using Chip Erase Command.

    You return to the <target> Flash Programmer Target editor window, and the action appears in the Flash Programmer Actions group.

  15. To allocate a buffer of RAM to hold the erasure algorithm.
    1. Enter the start address of the RAM buffer in Address text box of the Target RAM group.
    2. In the Size option, enter the amount of RAM that makes up the buffer.
    3. Check the Verify Target Memory Writes checkbox. For this example, the start address of the buffer was 0X20000000, and its size was 0X00008000.

      The Target RAM group displays the start address of the RAM memory buffer, and its size.

      Figure 5. Flash Programmer Task Editor Window with ColdFire Erase Settings
      Flash Programmer Task Editor Window with ColdFire Erase Settings
  16. Click the Close icon to save the settings and close the <target> Flash Programmer Task editor window.

    You can access the newly-made Erase portion of Flash task from the Target Tasks view.