Forum Discussion
Altera_Forum
Honored Contributor
21 years ago --- Quote Start --- originally posted by wombat@Feb 21 2005, 12:09 PM where is your read/write data stored?
nios2-download will set up the initial values of the text, rodata and rwdata sections before starting the processor.
if you reconfigure the fpga (as happens at powerup) then the initial values of the text, rodata and rwdata sections will be loaded from the configuration device (they're part of the sof file).
but if you just reset the processor then this just sets the program counter to the reset address. the text and rodata sections should not have been changed so they'll be ok, but the rwdata section will have been modified by your program from the expected initial values. this is probably what's causing the problem. --- Quote End --- Thanks wombat for your answer. Everything is stored in one sram data section. At the very beginning of my program it just prints a message to uart stdout but even this fails after resetting the processor manually. So could the uart be the problem? The only way I got this to work is by programing the flash rom and directing the reset address to flash. The final program should boot from there as well so if the reset address points to the flash boot copier routine everything is initialized correctly. This works for the DSP development board.