| |||
| Home > Programming Flash with RealView Debugger > Programming Flash on the ARM development boards > Programming an image into Flash on the Integrator/AP | |||
To program an image into Flash, you request RealView Debugger
to write to the Flash memory region that you have defined by using
the Integrator/AP BCD file. The Integrator Flash starts at memory
address 0x24000000, so to write an image to Flash:
If required, create an image file compiled to run
with code at 0x24000000 and that has data in
RAM.
For example, rebuild the dhrystone image using the following linker options:
--ro_base 0x24000000 --rw_base 0x8000
Select Target → Load Image... from the Code window main menu to open the Select Local File to Load: dialog box.
Locate the required image file, and click Open to open the Flash Memory Control dialog box, shown in Figure 6.2. RealView Debugger queues the image in preparation for writing to Flash.
If you are updating part of the Flash block and you want to retain the current values in the rest of the block, select the Use Current values for Unspecified data in block check box. This check box is selected by default.
When selected, RealView Debugger reads and then writes the entire block. This might take some time to complete.
The Clock Frequency field is enabled if it is required
by your Flash device. This has the format .f[Hz|kHz|MHz]
Enter the clock frequency as
a positive floating point number, for example, f14.175MHz. The
unit specifier is optional, and defaults to Hz.
This field is enabled only if the board-level AME file that
you used to create the FME file contains the line needs_clock=true.
Click Write to commit the image into Flash.
You must wait for the Flash routine to load and run, that is wait until the last block has been written before continuing (shown in Figure 6.3).
Click Close to close the Flash Memory Control dialog box.
The memory map in the Memory Map tab is updated to show the details of the image, shown in Figure 6.4.
Be aware that if you reload an image that resides in Flash, then RealView Debugger re-displays the Flash Memory Control dialog box. However, RealView Debugger resets the PC to the image entry point, and you do not have to rewrite the image to Flash. Click Close to close the Flash Memory Control dialog box. Alternatively, if you reset the PC to the image entry point, this is avoided.
the following in the RealView Debugger User Guide: