The information on the page had been superseded by the information in the new AN 736: Nios II Processor Booting From Altera Serial Flash.
In Quartus 14.1, Altera introduced a new serial flash loader which can be used to program and load serial and quad SPI flash devices. Here is how to properly program your Nios II executable into a serial flash so that your Nios can boot from the flash. This implementation assumes that the serial flash is simply storage and that the executable will be loaded into and executed from RAM. This has been verified with an EPCS16 serial flash.
This example uses the Quartus Programmer, not the nios2-flash-programmer (only because that was the flow I needed to use when I did this.)
This example uses the CFI flash bootloader and eliminates some of the problems with the programming and boot flow of the old EPCS Flash controller.
An example project containing both Quartus and Nios II SW projects can be downloaded here: File:Epcq test be micro sdk.zip. This example targets the BeMicroSDK board.
This example uses the Quartus II programmer for programming the EPCS, not the Nios II Flash Programmer, as that is what was required for this specific project.
<Altera Serial Flash Controller instance name>.avl_mem
Be aware that compressed file sizes will differ build to build
make mem_init generate
Set the base address and the reset address to the absolute address of the Nios II reset vector. This is the computed "Reset vector:" field in the Nios II configuration GUI. Anything else will result in a .flash file with incorrect addresses.
elf2flash --input=<Nios ELF file name> --output=<.flash file name> \
--base=<EPCQ base address from Qsys memory map> \
--end=<EPCQ end address from Qsys memory map> \
--reset=<Nios II reset vector> \
--boot=<ACDS install path>/ip/altera/nios2_ip/altera_nios2/boot_loader_cfi.srec --save
nios2-elf-objcopy --input-target srec --output-target ihex <.flash file name> <.hex file name>