Forum Discussion
.elf of updated build not downloading to Nios V from RiscFree
- 1 year ago
Thank You for Your reply.
Things has made a weird turn to the better..
I tried to recreate the situation before I did the edits in bsp_editor I mentioned in my previous post.
I started bsp_editor, opened the settings.bsp-file, checked enable_alt_load and enable_alt_load_copy_rwdata and generated bsp_settings again.
However, I did not get back to my previous situation. I was still in a situation where a reset would freeze the niosV, only a new run from RiscFree would get it running again.
To get out of this situation, I tried to generate a new bsp rather than editing the old one.
Voila:, everything works. If I edit the hello.c file, the newest version runs on then NIOS.
I think I am now in the situation where the old proverb "If it aint broken, dont fix it" applies.
We can consider this case closed.
Unfortunately, when I regenerated the new setting.bsp the old one was overwritten, and it it thus not possible to compare working and non-working versions.
Thank You again for Your help.
Best regards
Eivind
Thank You for Your reply.
I run the project om a DE2-115 evaluation board with Cyclone IVE. There is no flash memory so I assume I boot from OCRAM.
In Nios® V Embedded Processor Design Handbook I find:
| Nios® V processor application execute in-place from On-chip Memory (OCRAM) | OCRAM | OCRAM | Enable allow_code_at_reset in Advanced.hal.linker and uncheck other settings. | Make sure all Linker Sections are set to OCRAM. |
I checked Advanced.hal.linker in bsp-editor. In my system allow_code_at_reset was checked, but also enable_alt_load and enable_alt_load_copy_rwdata.
I unchecked enable_alt_load and enable_alt_load_copy_rwdata and generated bsp_settings again.
When I build the software project I now sometimes, but not always, get this waring:
warning: hallo.elf has a LOAD segment with RWX permissions
If i get this warning, the program will not run at all. Pressing reset button has no effect.
However, if I do not get this waring during compile, the program is running latest version of the .elf-file.
The drawback is that a reset from reset button makes the app stop executing, it will not restart, not even after repeated press to reset button. To get the program running again I need to do a "run" from RiscFree software.
Best regards
Eivind