Forum Discussion

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

Run as hardware

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

4 Replies

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

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.