49
TR10a-LPQ User Manual
December
10,
2018
Figure 3-11 Flash_Restore folder content
The flash_program.bat is the top batch file for flash programming. The batch file will
configure the FPGA with Flash_Programming.sof (Parallel Flash Loader II IP) and
launch flash_program.sh Nios II command batch file to perform the following tasks:
1.
Use Nios II utilities
elf2flash
and
nios2-elf-objcopy
to convert
Factory
Nios II
code and
User
Nios II code to factory_sw.hex and user_sw.hex, respectively.
2.
Use
quartus_cpf
utility according to a given configuration file
flash.cof
to merger
all files (factory_sw.hex, user_sw.hex, factory .sof file, user .sof file, and option bit)
into a single file
flash.pof
.
3.
Use
jtagconfig
utility to adjust jtag speed.
4.
Use
quartus_pgm
utility to program flash with flash.pof.
Developers can copy their .sof & .efl files into the factory folder or the user folder, and
launch the flash_program.bat to program their code into the CFI-Flash.
3.9
Restore Factory Settings
This section describes how to restore the original
Factory
image and
User
image into
the flash memory device on the FPGA development board. A programming batch file
located in the
Flash_Restore
folder is used to restore the flash content. Performing the
following instructions can restore the flash content:
1.
Make sure the Nios II EDS and USB-Blaster II driver are installed.
2.
Make sure the FPGA board and PC are connected with an USB Cable.
3.
Power on the FPGA board.
4.
Copy the “Demonstrations/Flash_Restore” folder under the CD to your PC’s