Forum Discussion

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

Using Redboot to boot Altera HAL Apps

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?

5 Replies

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

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

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

    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?

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

    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.