I programmed the flash using the "convert programming files" method, merging the sof and the flash.hex (make mem_init_generate) and programmed the pof with the quartus programmer.
There is one thing to note: I don't have a licence for the /f core yet, so i can not merge the timelimited sof. Therefore i merge a non timelimited sof (empty project) with the hex and flash only the UFM and not the CFM. After that i configure the device with the timelimited sof. I hope this shouldn't be the problem?
Ok that is right the data slave must be connected to the data master of the nios. Strange that the verify was successful.
So i tested this. I kept the data slave unconnected, built two different programs (program1 and program2) flashed the hex of program1 and verified against elf of program2.
nios-download always says Verified OK.
With connected data slave, i get a Verify missmatch as expected.
Downloaded 20KB in 0.3s (66.6KB/s)
Verifying 00020000 ( 0%)
Verify failed between address 0x20000 and 0x24EF7
Leaving target processor paused
0x20000 is the reset address and baseaddress of the flash.
Verify against program1 elf succeeds as expected, so i think the flash content is correct.
For testing without debugger i added a PIO component to toggle a LED in a loop with alt_busy_sleep.
I used "nios-download --reset-target --go" to reset and start the processor without debugging.
- The led does not blink with cachelinesize set to 64 bit. => core stuck?
- Using cachelinesize set to 128 bit the LED starts blinking.
I don't think it is an debuging issue, probably the accelerator stalls the instruction bus?.