Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21345 Discussions

Enet to Nios to CFI FLASH programming

Altera_Forum
Honored Contributor II
1,173 Views

Hi All, 

I have a question on implementing a remote update feature on a design - I have a dual stage bootloader that can select between 2 images that are at a fixed location in CFI flash, and I know that when I generate these using the scripts (elf2flash or the like) I end up with a motorola srec formatted file that is then uploaded through the nios2-flash-programmer. Generating this file requires me to know the location in flash that the file is heading to.  

 

Somewhere along the way, the srec format is stripped and raw data gets written to flash - my question: how do I prepare an image file that I can send to the system memory over a remote connection (like ethernet) and then the nios can write it to the location in CFI flash that it wants. Do I simply generate a raw bin file? 

 

C
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
452 Views

...anyone?

0 Kudos
Altera_Forum
Honored Contributor II
452 Views

this (http://www.altera.com/literature/an/an429.pdf) is one example. There's also the BUP (Board Update Portal) that ships with a lot of the kits, though I'm not sure source code is given for that. Both of these use the SREC/Flash format, parse it on the embedded side. Neither is all that efficient/fast...easy to improve upon.

0 Kudos
Altera_Forum
Honored Contributor II
452 Views

i've modified the BUP before, i think all of the source is available

0 Kudos
Reply