- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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...- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you monkeyboy,
i know why it failed from your explanation.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page