Altera_Forum
Honored Contributor
20 years agopof file for EPC4/EPC8/EPC16
Here's how to get a .pof file for the EPC4/EPC8/EPC16 configuration devices which include the FPGA configuration data as well as the NiosII boot code. This is for users who want to download their executable to the EPC flash and then use the EPC device's External Flash Interface to run the Nios from the EPC flash. This goes into detail on how to set up the SOPC Builder project and IDE to execute from flash, as well as how to generate the .pof file.
Users should refer to Altera's Configuration Handbook for configuration data sizes (section I, chapter 1) and the EPC memory map (Section I, chapter 3.) -Determine the size of the configuration data in bytes (see the Configuration Handbook) -Add 0x10000 to the config data size (see the EPC memory map.) -Select an address above this for the start of the Nios II code. -In SOPC Builder -Click on the More "<cpu name>" Settings tab -Set the "Memory Module" for the "Reset Address" to "<EPC flash device name>" -Set the "Offset" to the address determined above -Click "Generate" to re-generate the system -Exit SOPC Builder -In the IDE -Select the software project's system library, right-click, and select "Properties" -In the "Properties" window, select "System Library" on the right -On the far right, set "Program memory" and "Read-only data memory" to "<EPC flash device name>" -Click OK and re-build the project -Open a NiosII SDK Shell -In the SDK shell, cd to the SW project directory, then cd into "software/<project name>/Release -Run the following command, replacing the stuff in <> to the right names: nios2-elf-objcopy -O ihex <project name>.elf <file name>.hex -In Quartus II, open the "Convert Programming Files" tool -Select the EPC8 configuration device -In the bottom window, click on "SOF Data" then click "Add File..." and select the .sof file for the device -In that same window, click on "Main Block Data" then click "Add File..." and select the code hex file created above -Make sure that the hex file properties are set to "Absolute Addressing" not "Relative Addressing" -Select the output .pof file -Click OK -Program the EPC8 with the .pof file, configure the device and see that the Nios 2 is running.