Forum Discussion
Altera_Forum
Honored Contributor
15 years agoNow that I look back at a past project where I did something similar, I see that I did in fact use the srecord (http://srecord.sourceforge.net/) utilities in my script file as slacker has just suggested.
Using sof2flash and elf2flash I created the required .flash files (which are just s-record files AFAIK) all at offset zero. I then used srec_cat to apply an offset and combine all the files together. This combined file can be used with nios2-flash-programmer to actually program the flash. An example command line to combine and offset files with SRecord:
srec_cat file1.flash --offset 0x10000 file2.flash --offset 0x20000 > combined.flash