Platform Studio
The following prerequisites must be satisfied before you use the Program Flash Memory dialog box:
You must launch the dialog box from within a suitable Xilinx® Embedded Development Kit (EDK) project, that is, a design that has a core able to communicate with flash memory. The dialog box infers and uses data from the EDK project currently open.
Your hardware design must have correct connections between the flash and at least one processor through the On-chip Peripheral Bus (OPB) or Processor Local Bus (PLB) Enclosure Management Controller (EMC) peripherals.
You must make sure that the target board is connected to the host via JTAG and the FPGA is initialized with the bitstream of the project because the dialog box works by downloading and executing a flash programmer application.
You must have used the XMD Debug Options dialog box to specify the up-to-date debugger information about the design. If you wish to use a MicroBlaze processor for programming flash memory, the processor must have a Microprocessor Debug Module (MDM) connection. Flash programming cannot be performed if the XMDSTUB software intrusive monitor is used as the debug link to the processor.
You must perform the Generate Libraries and BSP step prior to this, since the flash programmer uses the processor’s libraries.
The flash programmer must have at least 8 kilobytes
(kB) of free space to execute from your design. The flash programmer itself
occupies a large portion of this memory. The remaining chunk is used as
a buffer for streaming data from the host, on its way to the target. Consequently,
if the flash programmer executes from a large bank of memory with lots
of excess space (beyond 8 kB), then it will greatly improve the speed
of the flash programmer. This becomes significant when programming large
image files.
To verify the amount of free space you have for the flash programmer:
In System Assembly View, select the Address Filter radio button.
Look in the Size column for the appropriate instance name.
If you need to increase the amount of available address space, click on the number indicating the size, and select a new size from the drop down menu.
Click Device Configuration > Program Flash Memory to open the Program Flash Memory dialog box, enter information in the fields provided (described below), and click the Program Flash button to start the flash writer.
File to Program
Browse to and select the file you wish to program onto the flash device or type the path in the text box.
Auto-convert file to bootloadable . . . format when programming flash
Select the "Auto-convert file to bootloadable" check box if the file to program onto the flash device must be converted and stored on the flash device in an image format. Select the image format, such as Motorola S-record (SREC) format, from the drop-down list. The auto convert file option is available only when the file to program is in Executable Linked Format (ELF). This option is useful when creating bootloaders and the ELF image of the bootloader must be converted into a common bootloader image format such as SREC.
Processor Instance
Choose the processor that is connected to your flash devices via an EMC controller. This processor will be used to execute the flash programmer application.
Flash Memory Properties
Instance Name
Choose the instance name of the memory controller that interfaces with
the flash devices on your target board.
Program At Offset
Choose an offset within the flash to which the image file is to begin programming.
Note: If you want to program different file images at different parts of the flash, you would be changing this parameter each time to choose a different position within the flash at which to program the file.
Scratch Pad Memory Properties
Instance
Name
Choose the instance name of the memory controller that connects to the
free scratch pad memory that you wish to use for storing the flash programmer.
It must satisfy size constraints as described earlier. Do not select the
same memory controller as that of the Flash Memory.
Create Flash Bootloader Application
To help you get quickly started with bootloading your software application from flash, you can create a simple bootloader automatically by selecting the Create Flash Bootloader Application check box.
The resulting bootloader will be able to boot an image file in SREC format, given an address in memory where the image is assumed to be stored and is accessible by the processor. This bootloader has been designed to obtain the image file from flash memory, which is expected to have been programmed with the image prior to invoking the bootloader. You can also subsequently modify these sources to adapt the bootloader for any specific scenario or for adding new capabilities to it to fit your needs.
You can also convert an ELF file to SREC manually, from a command line. For instructions on how to do this, see the "Flash Memory Programming" chapter of the Embedded System Tools Reference Manual (included in the /doc directory of your EDK installation).
SW Application Project
In the SW Application Project field, specify the name of the bootloader application. The name of the bootloader is initialized with an auto-generated value, but you can change this value if required.
Program Flash
Click the Program Flash button to start the flash writer. The dialog box launches Xilinx® Microprocessor Debugger (XMD) in the Xilinx® Platform Studio (XPS) console. The rest of the algorithm proceeds from the XMD console.
See Also
The chapter "Flash Memory Programming" in the Embedded System Tools Reference Manual for a list of supported flash configurations, for a discussion of customizing flash programming, and for other information about tool functionality.
Overview of Flash Memory Programming
Downloading Bitstreams to an FPGA
Send any feedback on this topic to isedocs@xilinx.com.
To forward a link to this topic, click here.
Copyright © 1995-2006 Xilinx, Inc. All rights reserved.