Visible to Intel only — GUID: eec1494970064051
Ixiasoft
Visible to Intel only — GUID: eec1494970064051
Ixiasoft
5.3.5.6. Booting Directly From CFI Flash Memory
To use the Nios® II flash programmer to program the boot copier and the test application in CFI flash memory, perform the following steps:
- In the Intel® Quartus® Prime software, on the Tools menu, click Programmer.
- Make sure the <project> \niosii_ethernet_standard_<board>.sof filename appears in the File column.
- Make sure the Program/Configure option is turned on.
- Click Start to configure your FPGA with the .sof file.
- In a Nios® II command shell, change to the directory: <project> /boot_copier_sw/app/hello_world.
- Set the offset in flash memory at which to locate the hello_world boot image, by typing the command:
bin2flash --input=hello_world.elf.flash.bin \ --output=hello_world.flash \ --location=0x00240000 //Press ENTER
Set the offset to 0x00240000 or 0x00440000, because in boot from CFI flash mode, these are the two locations where the boot copier expects boot images 1 and 2, respectively. The two addresses work equally well.
You can also change these default locations by editing the #define statements for BOOT_IMAGE_1_OFFSET and BOOT_IMAGE_2_OFFSET in the <project> /boot_copier_sw/app/advanced_boot_copier/advanced_boot_copier.c file, and then rebuilding the boot copier.
- Program the hello_world boot image in flash memory by typing the following command:
nios2-flash-programmer --base=<flash_base>\ hello_world.flash //Press ENTER
, where <flash_base> is the base address of the CFI flash component in your Platform Designer system. - In a Nios® II command shell, change to the directory: <project> /boot_copier_sw/app/advanced_boot_copier.
- Create the flash memory file for the boot copier by typing the following command:
make flash //Press ENTER
This command creates the file <flash_component>.flash, where <flash_component> is the name of the CFI flash component in your Platform Designer system.
- Program the boot copier to flash memory by typing the following command:
nios2-flash-programmer --base=<flash_base> \ <flash_component>.flash //Press ENTER
- Skip ahead to the “Running the Advanced Boot Copier Example” section.