Tutorial L: Programming with Simple Flash

The goal of this tutorial is to demonstrate the use of CodeWarrior Simple Flash Programmer. This feature enables you to perform these basic flash operations:

To open the Simple Flash dialog box:

  1. Click the Flash Programmer icon on the IDE toolbar.
    Figure 1. Flash Programmer Icon
    Flash Programmer Icon
  2. Select Flash File to Target.

    The Simple Flash dialog box appears.

    Figure 2. Simple Flash Dialog Box
    Simple Flash Dialog Box
    • Remote system Connection drop-down list - Lists all run configurations defined in Eclipse. If a connection to the target has already been made the control becomes inactive and contains the text Active Debug Configuration.
    • Flash Configuration File pop-up menu - Lists predefined target tasks for the processor selected in the Launch Configuration and tasks added by user with the Browse button. The items in this pop-up menu are updated based on the processor selected in the launch configuration.
      • Unprotect flash memory before erase checkbox - Select to unprotect flash memory before erasing the flash device. This feature allows you to unprotect the flash memory from Flash File To Target dialog.
        Note:

        "Flash File To Target" feature creates a Flash Programmer Task in a background and then executes it. There is a possibility to save a created Task using "Save as Target Task" checkbox. Steps taken during "Flash File To Target" can be examined of to open such saved Target Task. Unprotect action is inserted before Erase when "Unprotect flash memory before erase" option is enabled. All regions of a Flash module are selected for unprotection when Target Task with Unprotect action is created using "Flash File To Target" dialog.

    • File to Flash group - Allows selecting the file to be programmed on the flash device and the location.
    • File textbox - Used for specifying the filename. You can use the Workspace, File System, or Variables buttons to select the desired file.
    • Offset:0x textbox - Used for specifying offset location for a file. If no offset is specified the default value of zero is used. The offset is always added to the start address of the file. If the file does not contain address information then zero is considered as start address.
    • Save as Target Task - Select to enable Task Name textbox.
      • Task Name textbox - Lets you to save the specified settings as a Flash target task. Use the testbox to specify the name of the target task.
    • Erase Whole Device button - Erases the flash device. In case you have multiple flash blocks on the device, all blocks are erased. If you want to selectively erase or program blocks, use the Flash programmer feature.
    • Erase and Program button - Erases the sectors that are occupied with data and then programs the file. If the flash device can not be accessed at sector level then the flash device is completely erased. This feature helps you perform these basic flash operations: