3.10. Exporting your Flash Algorithm to RVD

Flash algorithms created in Eclipse can be exported as a Flash MEthod (FME) file for use with RVD. You should ensure that your flash algorithm is fully working and tested in Eclipse before exporting it because it is difficult to diagnose FME problems in RVD.

There are some differences between the flash algorithms used by the Eclipse Flash Programmer plug-in that those used by RVD that you must be aware of:

To export a flash algorithm as an FME file:

  1. Select File → Export… from the Eclipse main menu. The Export wizard opens (see Figure 12).

    Figure 12. The Export Wizard

    The Export Wizard
  2. Select RealView Debugger Flash Device and click Next.

  3. Select the flash device to export, either from an already installed device or from an Eclipse flash project (see Figure 13). Enter the name and location for the exported FME file. Click Next.

    Figure 13. Selecting a flash device to export

    Selecting a flash device to export
  4. Describe the block structure of the device. Click the Add… button to manually enter the block structure, or click the Query device for structure… button to attempt to automatically determine the block structure by connecting to your target hardware and running your Eclipse flash algorithm. Click Next.

    Figure 14. Describing the block structure of the device

    Describing the block structure of the device
  5. Enter other parameters needed by the FME file, including the start address of RAM on your target hardware and the size of the buffer to be used during programming. For maximum programming performance, the buffer size should be as large as possible, within the limits of the RAM available on your target hardware and taking into account that the amount of available RAM is reduced by the code and any other data required by your flash algorithm. RVD places an upper limit of 65535 bytes on the buffer size.

    The Needs clock check box specifies whether the user is required to enter a clock speed parameter when using the FME file in RVD. Most flash algorithms do not need to know the clock speed of the target hardware, so Needs clock should be left unchecked. Flash algorithms for the Philips LPC2xxx microcontrollers are an example of where Needs clock must be checked.

    Figure 15.  Entering other device parameters

    Entering other device parameters
  6. Click Finish. The FME is written to the location you specified in step 3.

To use an exported FME file with RVD you must additionally write a BCD file describing the location of the FME file and where in memory the flash device exists.

Here is a minimal BCD file that you can copy:

[BOARD=MYBOARD]
Advanced_Information.ARM={\
    Memory_Block.MY_FLASH_DEVICE={\
        flash_type="C:/MyFlashDevice.fme"\
        :start=0x0\
        :length=0x4000\
        :access=Flash\
        :description="my flash device"\
    }\
}

You must edit the start and length to be the start address and length in bytes of your flash device and edit flash_type to be the full path to your exported FME file. You can optionally change the name of the BCD file by editing BOARD and give a description of your flash device using description.

To use the new BCD file copy it into the etc directory within your RVD installation, for example: C:\Program Files\ARM\RVD\Core\3.1\881\win_32-pentium\etc. You can then select the BCD file from within the RVD Connection Properties window using the name given on for BOARD. After connecting to your target hardware, you should see your flash device listed in the RVD Memory Map pane and should be able to write images to flash.

Further information on writing BCD files is available in the RVD documentation and on the ARM web site:

Copyright © 2007. All rights reserved.DAI0190A
Non-Confidential