Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12589 Discussions

store two software images on flash

Altera_Forum
Honored Contributor II
1,006 Views

Hi all, 

I am trying to boot from onchip memory, and at the end of the bootloader, it has to select between two (or more) applications stored on flash. Altera offers AN about how to do that, but my question is how to program the flash with two different images. I know that first we need to use the elf2flash to convert the application into flash format - so I need to run it for each application, how can I tell it that app1 is going to sit at location FLASH_BASE+x and app2 at FLASH_BASE+y ? 

Help is appreciated. 

Thanks
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
287 Views

There are probably many ways to accomplish this. My favorite method is to use a program called s-record (http://srecord.sourceforge.net/) to manipulate the image files. 

 

You can checkout this other thread (http://www.alteraforum.com/forum/showthread.php?t=28039) where a similar topic was discussed which includes some examples of how to use S-Record.
0 Kudos
Altera_Forum
Honored Contributor II
287 Views

Thank you kevin, 

I was able to transform the resultant elf file into a flash file and load it at a desired location in flash. 

Now I am trying to load the bootloader off of onchip. the bootloader is expected to load the image from flash. But the bootloader keeps rebooting itself as if the image in flash was pointing back to the bootloader code in onchip. Any pointers ?
0 Kudos
Altera_Forum
Honored Contributor II
287 Views

To support booting different ELF files, you will need to create a custom boot loader (or modify the standard one). The default boot loader will only every load the first ELF file immediately after the first SOF. Have you done this?

0 Kudos
Reply