Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- So my question is this; is there any way I can programatically determine where the application and FPGA configuration end? Or in other words, how can I tell how much space they consume? --- Quote End --- You get this information from the .sof and .elf files you use to program epcs. For example you may use this manual procedure: 1. Convert fpga configuration .sof file into hex sof2flash --epcs --input=fpga_project.sof --output=fpga_project.flash 2. Convert Nios firmware .elf file into hex right after fpga configuration elf2flash --epcs --after=fpga_project.flash --input=nios_firmware.elf --output=nios_firmware.flash Open the resulting nios_firmware.flash with any text editor, go to the end and read the max used address. Remind that epcs is made of 64KB size blocks, so you must place your user data starting from the beginning of the next block and not right after firmware, otherwise you couldn't erase and change it without erasing the last part of firmware data. --- Quote Start --- On a related note, once I overwrite the FPGA configuration in EPCS, is there any way to force a reconfiguration and reboot from within the application code? --- Quote End --- You should consider using remote_update core. Refer to AN521.