Boot code – Altera Nios II Embedded Evaluation Kit Cyclone III Edition User Manual
Page 68
Altera Corporation
C–2
July 2010
Nios II Embedded Evaluation Kit, Cyclone III Edition
7.
From the Nios II Command Shell change directory to altera/
<
version #>/kits/cycloneIII_3c25_niosII/factory_recovery/
flash_contents
8.
From the Nios II Command Shell, program the factory image into
flash by typing the command:
Nios2-flash-programmer --base=0x04000000
restore_cycloneIII_3c25.flash
1
If you get the error message: No CFI table found at address
<address> Leaving target processor paused then check that
either the address is correct (i.e. hex four million, six zeros after
the 4) or that you have tow “-“ characters before the “base”
9.
You should now be able to reset the board to start the application
selector.
Rebuilding the
Application
Selector from
Source Files
This section describes the process of rebuilding the factory recovery
image from source files. You may wish to modify and rebuild the factory
recovery image you’ve modified the application selector or boot code and
would like a single recovery file which includes your modifications. Keep
in mind that any modifications you make to the application selector or
boot code, may make them incompatible with existing applications.
Each portion of the factory recovery image is described below, with
instructions on how to create it and program it to flash. The last section
here, titled
“Combining factory recovery image files”
, includes
instructions for creating a single factory recovery image that you can
program into flash at any time to restore the factory configuration of the
Embedded Evaluation Kit board.
To perform the tasks illustrated in this section, you must first open a
Nios II command shell.
Boot Code
The first portion of the factory recovery image is the application boot
code, located at flash offset 0x0.
describes the functionality of
the boot code and how to rebuild it from the source files.
Building the boot code produces a file named app_selector_boot_code.srec.
This file can be directly programmed to flash using nios2-flash-
programmer in the Nios II command shell.
1.
From the Nios II Command Shell navigate to altera/<version # >/
cycloneIII_3c25_niosII/examples/application_selector/application
_utilities/application_selector_boot_code