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

Flash offset Nios II Flash Programmer

Altera_Forum
Honored Contributor II
1,771 Views

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?
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
421 Views

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

0 Kudos
Altera_Forum
Honored Contributor II
421 Views

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
0 Kudos
Altera_Forum
Honored Contributor II
421 Views

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.
0 Kudos
Reply