Hi,
the sof cannot be saved to flash.
If you use a Blaster you should generate a JIC file and use that.
There are numerous ways to do this, and i wonder how you manage to program the flash with a sof file...do you use an external programmer?
If you are using a small program then you may use the internal ram in the fpga as code storage.
Like 20K ROM and 8K ram should work fine (actually much smaller if you have to).
Whe you generate your nios files you must:
-- Set stdio away from the jtag_uart (maybe a RS422/RS232 output port is available)
-- Map the different locations to rom and ram (and the cpu reset vector)
-- Turn off c++ support and exit support
After compilation:
- Update the .hex files in the quartus directory (Nios)
- Update mem init files (quartus)
- Run assembler (quartus)
Convert sof to Jic.
Program EPCS (or other flash)
Now you code is embedded in the internal ram of the fpga.
With some luck your program will run from flash.
(Note that there are other issues you will need to address, but this is a rough roadmap)
Once it is running you can start porting the whole project to flash.
Apus