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++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Nios boot loader

Altera_Forum
Honored Contributor II
1,729 Views

Hi. 

I am new in Nios subject, but i have not many time to study this issue. My boss wants results, so please, help me as you can. 

One of functionalities for my system is to update the program(I mean Nios firmware). 

May i update the firmware without updating boot loader. If the answer is YES, how to do it? 

If the answer is NO, how can l update firmware? 

If this option (update firmware) is available, how to do it. 

 

If you, guys, do not wants to explain, but there are documents or application note, which can explain me the issue, give links to this documents. 

 

Thank, you Slava.
0 Kudos
8 Replies
Altera_Forum
Honored Contributor II
836 Views

You can have two images in flash. One contains the bootloader and a configuration able to reconfigur the flash memory, and a second one contains the application. 

Have a look at application note 458 (http://www.altera.com/literature/an/an458.pdf)
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

 

--- Quote Start ---  

You can have two images in flash. 

--- Quote End ---  

 

I do not need two images 

 

According an458, l can build boot loader and application and,if i use EPCS memory, boot record not must contain boot loader and application(boot record) together. So i can buid boot loader and if i want to update the application, i just replace current application by a new one. 

 

Is it correct?
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

Yes you can do it this way too. But if you have only one image in flash and it gets screwed up when trying to update it, you could end up with an unbootable system that would require a JTAG connection to re-initialize.

0 Kudos
Altera_Forum
Honored Contributor II
836 Views

But i do not get what the advantage of two images. If i screwed up when trying to update, 

l end up with bootable system, but the application, which is able to update is not on the flash and l can not try to update the application again.
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

If something goes wrong when you write in the flash, then on the next power up, the FPGA won't be able to load its configuration, and you will need a JTAG connection to reconfigure it. 

If you have two images, and a problem occurs when flashing the application image, the FPGA can still configure itself with the first image and wait for instructions. It is then possible to correct the problem without a JTAG interface.
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

One of the two images is the bootloader and is "read only", the second one is the application (you can and should flash this one). 

If you mess up the application, then the FPGA boots with the bootloader and lets you upload a new application image. There is no need to reconnect a JTAG cable to reprogram it, because the bootloader is still intact, just like your boss wanted.
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

daixiwen, i know you'll know the answer to this - i have the advanced bootloader built as in am458 but when the loader tries to write the new image over the interrupt vectors, the system wedges - how do you get around this? (http://alteraforum.com/forum/member.php?u=4443

 

Chris
0 Kudos
Altera_Forum
Honored Contributor II
836 Views

I never used the advanced bootloader, but I guess that disabling the interrupts before rewriting the table could be a good idea. I don't think the bootloader uses interrupts anyway.

0 Kudos
Reply