Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Enet to Nios to CFI FLASH programming

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

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

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

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.