--- Quote Start ---
Hi DOLPHIN,
> I have a Nios2 system that runs from flash (flash = program memory).
> My program needs to access flash at a certain moment, it needs to write/read some data to it.
I believe the hal prevents you from doing this -- when you try to write to the flash, your flash
device will no longer be driving array data on the data bus ... and your CPU will be (trying) to
execute status info from the device.
> Did anybody have a similar problem and how did you solve it?
Yes, this was discussed here:
http://www.niosforum.com/forum/index.php?a...f=17&t=1900&hl= (
http://www.niosforum.com/forum/index.php?act=st&f=17&t=1900&hl=)
Dear Scott,
I tried to look at this post but it didn't work.
I have another question on this topic. We are having a similar problem - we are not able to get access to our EPCS Flash device using the function alt_flash_open_dev. We keep getting return value of "Fail"
As far as I understand from this post - you can't access (read or write) to the EPCS if you are running code from it ? Thats fine - in our IDE environment we have set the linker script parameters to an External ASRAM and On Chip Memory. Is there any where else we have to look - e.g. the boot loader location (to tell you the truth - I don't know where this is set and stored ) ? We have set the reset address within the SOPC environment to the EPCS device and the exception address to our ASRAM. We have no problems with doing flash programming from the IDE of both the SOF and the firmware. Also on reset to our device the firmware is copied correctly from our EPCS to our ASRAM and runs from there with no bugs.
We are trying to write addional firmware and an application which will enable us to read and write to our EPCS so that we can make updates without using the download cable. Can you give us any hints ?
Thanks
Shmuel