6.2. Writing a binary to Flash

Writing a binary to a Flash device requires the use of special algorithms, which are specific to each target. These algorithms are contained in the Flash MEthod (FME) files for each target.

The following procedure uses the ARM Integrator/CP board as an example of programming Flash:

The procedure assumes that the BCD file is already assigned to the target connection.

To write a binary to a Flash device:

  1. Make sure the binary is compiled to run in Flash.

    For example, the Integrator/CP Flash starts at 0x24000000.

  2. Start RealView Debugger.

  3. Configure the required connection to provide a memory map of the target, which includes the Flash. For the Integrator/CP example, you can assign the CP.bcd file to the target connection.

  4. Connect to the target.

  5. Load the binary, and specify the location in Flash where you want to load (for example, 0x24000000).

    The Flash device is opened, and RealView Debugger queues the binary in preparation for writing. The Flash Memory Control dialog box is opened, shown in Figure 6.1.

    Figure 6.1. Flash Memory Control dialog box

    Flash Memory Control dialog box

    Before you write the binary to Flash, do the following if required:

    • view Flash details

    • choose the required operations.

  6. The Clock Frequency field is enabled if it is required by your Flash device, and has the format f[Hz|kHz|MHz].

    Enter the clock frequency f as a positive floating point number, for example, 14.175MHz. The unit specifier is optional, and defaults to Hz.

  7. Click Write to program the binary into Flash.


    Wait for the write to complete before continuing.

  8. Click Close to close the Flash Memory Control dialog box.

  9. Click the Cmd tab in the Output view to see the Flash operations.

  10. Select View → Memory Map Tab from the Code window main menu to display the Memory Map tab where you can see the Flash memory area (green icon) on the Integrator/CP board. Expand the Flash memory map entry to see the Flash details.


You can display the Flash Memory Control dialog box during your debugging session. To do this, select Debug → Memory/Register Operations → Flash Memory Control..., from the Code window main menu.

See also:

Copyright © 2002-2011 ARM. All rights reserved.ARM DUI 0153N