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

Using Redboot to boot Altera HAL Apps

Altera_Forum
Honored Contributor II
1,017 Views

In the eCos 2.0 for Nios II doc, in section 9.4, it states that the memory module for my apps exception vector can't overlap the modules used for Redboot. Does this mean they have to be in different physical memory modules? Or simply in different areas of a single memory module?

0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
319 Views

Different areas of the same memory is fine. You just have to be certain they don't overlap.

0 Kudos
Altera_Forum
Honored Contributor II
319 Views

But, isn't the exception address fixed in SOPC builder?

0 Kudos
Altera_Forum
Honored Contributor II
319 Views

That's right.

0 Kudos
Altera_Forum
Honored Contributor II
319 Views

So how do both the redboot exception vectors and my code's exception vectors not overlap? Won't they both need to be placed at the fixed location?

0 Kudos
Altera_Forum
Honored Contributor II
319 Views

You don't need to worry about any code that Redboot may place at the exception vector. Redboot runs in polled mode, so when loading non-eCos applications there's nothing to worry about there. Preserving Redboots exception handler is only an issue when loading eCos applications. 

 

The documentation is admitedly a little unclear on this. What it was intended to say was that the exception vector should not be placed so that it causes the downloaded code to overlap the Redboot code assigned to the "text region", "rodata region" and "rwdata region" assigned in configtool. 

 

The simplest way to achieve this is to leave Redboot running from flash, ie. select a ROM configuration, and then allocate a small on-chip memory for Redboots "rwdata". The remaining memory can then be used for the downloaded application. 

 

However you don't need to use seperate memories, you just have to avoid an overlap.
0 Kudos
Reply