Forum Discussion

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

Flash offset Nios II Flash Programmer

I would like to know what flash offset address I've to set in the Nios II Flash Programmer GUI.

I'm using now 0x800 for the SOF file and no offset for the ELF file. This works fine.

But why 0x800? Is 0 - 0x7FF used for the bootloader code? What is the actual size of the bootloader code of the epcs_controller?

3 Replies

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

    No one any idea? It looks a simple question to me, but I can't find it in the documentation.

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

    There's shouldn't be any offset. The SOF is placed at the beginning of the EPCS and the software right after it.

    The bootloader code for the EPCS device resides in a small onchip memory that is part of the controller itself....less than 4k I think.

    The bootloader, itself, parses the header of the SOF to see just how large it is and then starts copying the code starting at the end of the SOF up until several 0xFF's are read consecutively....that's what I remember anyway. The sources are in the altera_nios2 component folder that comes with the Nios II EDS distribution.

    Regards,

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

    Thanks slacker. I just tried and you're right. I always used the offset and this also worked but I think the first 0x800 of the serial flash stay empty.

    The SOF does not need an offset. Thanks to you description I understand the way the SOF and bootloader are in the EPCS.