Forum Discussion
Altera_Forum
Honored Contributor
15 years agoSome Basic Doubts !! Urgent
Hi all, am pretty new to using NIOS processor. I have been using Quartus II for cyclone for making block diagrams. I have moved to NIOS as i need reduction in Logic cells. I have installe...
Altera_Forum
Honored Contributor
15 years agoAnd if you still want to do it the hard way, you could do something like the following in the Nios command shell:
nios2-elf-gcc -nostdlib -Ttext=0x1000 test.S
elf2hex --input a.out --output test.hex --width 32 --base 0x1000 --end 0x1FFFThe above assumes you have put your source in a file named "test.S" and that your on chip memory starts at 0x1000 and ends at 0x1FFF. You can adjust accordingly. If you assign the resulting test.hex file to on chip memory and set your Nios reset vector to this memory, it should run. Note that your program should have some kind of loop or something at the end so it doesn't keep executing beyond the end of your source with unpredictable results.