Set Up HCS08 Erase Task

Note: This procedure assumes that you have already created a project named DEMO9S08QG8_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 launched CodeWarrior and connected the DEMOS908QG8 board to the host system using 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 Flash DEMO9S08QG8.
  4. From the Run Configuration drop-down list, select a run configuration.
  5. From the Task Type drop-down list, select Flash Programmer for HCS08/RS08/ColdFire V1 from the listbox.

    The dialog box should appear.

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

    The <target> Flash Programmer Task editor window appears.

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

    The Add Device dialog box appears.

    Figure 3. Add Device for HCS08 Derivative
    Add Device for HCS08 Derivative
  8. Scroll through the list of microcontroller derivatives and select MC9S08QG8_FLASH. You can also type the filter text in the given text box.
  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. The Target RAM group displays the start address of RAM memory, and its size.

  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 added in the task and their base addresses.

  12. Select the flash devices and the sectors you want to add the erase action to.
  13. Click Add Erase Action.
  14. Click Done.

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

    Figure 4. <target> Flash Programmer Task Editor Window Settings for DEMO9S08QG8
    <target> Flash Programmer Task Editor Window Settings for DEMO9S08QG8
  15. Click the Close icon to save the settings and close the <target> Flash Programmer Task editor window.

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