Forum Discussion
Altera_Forum
Honored Contributor
19 years agoLook in the wiki, http://nioswiki.jot.com/wikihome/operating...flashprogrammer (http://nioswiki.jot.com/wikihome/operatingsystems/%c2%b5clinux/flashprogrammer)
you must use Nios2 v5.1 sp1 or later to program the EPCS correctly. Check your kernel dir, include/nios2_system.h or check in sopc builder , to find out the epcs controller's base address. If you want Nios II to boot from EPCS device, you have to set "reset address" to EPCS device in cpu option, SOPC builder. Then generate hardware in SOPC builder, and compile to sof. You have to update kernel, by "make ... clean" , "make.... hwselect.." and rebuild the kernel. If you use EPCS flash, find out and change the sof path and epcs base (replace 0x00900800) below. on nios2 sdk shell, cd arch/nios2nommu/boot# Creating .flash file for the FPGA configuration sof2flash --epcs --input=your_new_de2.sof --output=standard.flash# Programming flash with the FPGA configuration nios2-flash-programmer --epcs --base=0x00900800 standard.flash# Creating .flash file for the project elf2flash --epcs --after=standard.flash --input=zImage --output=epcs_controller.flash --boot=$SOPC_KIT_NIOS2/components/altera_nios2/boot_loader_epcs.srec# Programming flash with the project nios2-flash-programmer --epcs --base=0x00900800 epcs_controller.flash