Forum Discussion
Altera_Forum
Honored Contributor
21 years agoFinally I able to program both my onboard flash memory and the serial flash (EPCS) all from the flash programmer utility using only the Jtag header in one step. This is method seems preferable when you have to do in-the-field upgrades that may include both HW & SW.
The steps are these: 1) Modify or create a new flash programmer project. Make sure to use the --epcs flag in mk_target. Delete the default ASMI module and add an EPCS controller module. I had to do this in two steps (delete asmi, regenerate, add epcs, regenerate) because of SOPC errors. My flash programmer project would not compile until I reduced the payload buffer component from 2K to 1K. 2) Open your application in SOPC and select your newly created flash programmer as the target (thanks Nate). Regenerate and compile. 3) Open Eclipse and create a new SW 'hello world' project & build all. Open the flash utility. Create a new flash configuration with a unique name. Browse to your application. Check the box 'Write NiosII FPGA config'. The path should point to your main application sof. If it doesn't see step 4. The utility will 1st program the flash memory, then convert the sof config file to an rbf and then program the epcs device. 4) If you have any problems like you can't get the flash utility to talk to the board, or you see incorrect files being invoked in the programmer, shut everything down and re-open the files. Go back to step 1 and double-check your settings, re-generate, re-compile where possible.