Forum Discussion
Altera_Forum
Honored Contributor
8 years agoSolved!
I hope the following post would help the one who is still confused by this issue. 1. Please confirm which epcs controller is used in the project. a. if use EPCS/EPCQ Leagcy, an additional bootloader is needed (refer to "epcs bootloader" in alterawiki). Two Qsys projects are needed with different bootloader for factory and user images. Download the asm bootloader, change two definitions (EPCS_FLASH_CONTROLLER_0_BASE, SOFTWARE_OFFSET) according to the design, compile it. Then .hex will be generated. Go to Qsys, create a 1k onchip rom, assign the .hex to this rom in the onchip rom setting. Build Qsys project, then build Quartus project, after that .sof is ready. In my system: Factory sof at 0x000000 (reconfigure address) Factory App at 0x1c0000 (SOFTWARE_OFFSET) User sof at 0x200000 (reconfigure address) User App at 0x3c0000 (SOFTWARE_OFFSET) b. If altera serial controller is used. I think different reset address shall be set in cpu' vector setting. Not bootloader is needed anymore. 2. generate .flash for all .sofs, and .elfs. change address for .flash by using nios2-elf-objcopy. i.e. nios2-elf-objcopy -I srec -O srec --change-addresses=0x00200000 "./usersof_tmp.flash" "./usersof.flash" 3. For legacy controller nios2-flash-programmer works for .flash. For altera serial flash, nios2-flash-programmer does not work. The .jic is used to burn the flash. hdai