Forum Discussion

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

about niosII IDE system library property,

i am confused about it.

when: the reset address is in ext_ram,linker script setting is:

.text onchip_ram

.rodata ext_flash

.rwdata ext_ram

it run ok.

but when download to flash by flash programmer. press the reset button it failed.

when:the reset address is in ext_flash,linker script setting is:

.text onchip_ram

.rodata ext_flash

.rwdata ext_ram

building is error:boot copier overlaps data in flash. who can tell me why?

when:the reset address is in ext_flash,linker script setting is:

.text ext_flash

.rodata onchip_ram

.rwdata ext_ram

it can not debug!

who can tell me the linker script mechanism more detail than Nios II Software Developer¡¯s

Handbook.

thank you!

4 Replies

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

    ff113,

    There is more than meets the eye here - that is, more than just specifying reset address in SOPC Builder. In the IDE, right-click your syslib project and go to properties. One of the pages allows you to set up things in the system like where rwdata, rodata, and text go (you choose the memory i/f you want for each). These are normally all set to volatile memory so I'm wondering why rodata was set to flash? This is all assuming you're using our auto-generated linker script. After making any changes to these settings do a complete re-build of your SW.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    jesse

    yes i am using auto-generated linker script. i only test it. i know if these address setting to volatile memoty,it's ok.

    i wonder why the .rodata is in ext_flash when the reset address is in ext_ram.it run ok?

    and when the reset address is in ext_flash it failed?

    your meaning .rodata can't put into ext_flash? but it's opposite to my testing.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Currently the Nios II IDE can only create systems in a "boot from flash" rather than "run from flash" configuration. You can set the reset vector to point to flash, but the .text and .rodata sections must point to RAM.

    Placing the reset vector in flash will cause a boot loader to be placed at the reset address which will load your code into the specified location in RAM, and run it.

    If you want to "run from flash", i.e. place the .text and .rodata sections in flash there is a seperate thread on the General Software Forum, entitled "Run from Flash" where it's explained how to do it.

    I hope that helps...