Forum Discussion
Altera_Forum
Honored Contributor
18 years agoTo avoid re-compling all the time when you change "testdata.dat" you can open the contents of the file over JTAG. So Nios II will open "testdata.dat" just like a file (google search "C file I/O" if you are not familiar with that) and you just have to place the .dat file in a fixed location. Then your embedded system will read in the contents of testdata.dat each time you read from it. I don't recommend this if your test vectors are large since I find the transfer speed is around 4.5kB/s. If you test vector is large then your recompile method would be better (or some other means to transfer data to the system over a high speed link)
The software template "Host FS" will have more details of what to do and will show you how you can open files from your PC and/or have Nios II write files directly to your PC over JTAG. Keep in mind you have to do this in the debugger in the Nios II IDE (Host FS uses gdb to transfer the data). Over in the Nios forum I answered your question about why your line "outputdata=outdata;" doesn't work.