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++

Run as hardware

Altera_Forum
Honored Contributor II
1,392 Views

Hi, 

 

Now I want to write the bootloader by myself for my NiosII System.  

 

Can anybody tell me how to finish it in detail?  

 

And can you explain what action will be taken by NiosII IDE just follow the Run As Hardware instruction, and the file of which type will be downloaded to the embeded memory??  

 

Regards!!
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
292 Views

The usual effect of "Run as Hardware" is that the debugger sets the contents of memory locations specified in the .ELF file to match the ELF file, then it starts the processor at the entry point specified in the ELF file. 

 

This is pretty much what the bootloader does too - it sets up the memory so that it matches the ELF file and then jumps to the ELF entry point. 

 

It will probably be easier for you to use the Altera bootloader rather than writing your own - what's missing / wrong in the Altera one?
0 Kudos
Altera_Forum
Honored Contributor II
292 Views

Hi, thank you for your reply!! 

 

 

--- Quote End ---  

It will probably be easier for you to use the Altera bootloader rather than writing your own - what's missing / wrong in the Altera one?  

 

Because the SRAM on my board is the SSRAM, I can't make it run. and I doubt that is it the problem of the bootloader! 

 

And I can't understand your reply very well, I want to ask you that is there any file to be download into the memory, and what about type of the file?
0 Kudos
Altera_Forum
Honored Contributor II
292 Views

Hi:wombat 

 

 

 

Can you tell me where the bootloader code in ?
0 Kudos
Altera_Forum
Honored Contributor II
292 Views

The source for the bootloader is in the altera_nios2 component. Search for boot_loader_sources. 

 

As for how to make it boot - obviously you need to store the bootloader and its data blocks in a non-volatile memory. Flash is the obvious choice, but on-chip RAM build out of M4Ks (not MRAMs) is also initialised as soon as the chip is configured.
0 Kudos
Reply