Forum Discussion

ThangND's avatar
ThangND
Icon for New Contributor rankNew Contributor
3 years ago
Solved

How to boot Nios II from EPCS flash and run the program from SDRAM in board DE0-Nano

Hi,

I'm using the DE0-Nano board and I'm trying to program my Nios II application code via the EPCS flash and run it from SDRAM.

Here is what I've done:

1. Qsys:

I've set the reset vector of Nios CPU to the epcs flash.

2. After I've compiled my .sof and .elf file, I opened the Nios II command shell and typed the following command lines:

- sof2flash --input=hw.sof --output=hw.flash --epcq --verbose

- elf2flash --input=sw.elf --output=sw.flash --epcs --after=hw.flash -verbose

- nios2-elf-objcopy --input-target srec --output-target ihex sw.flash sw.hex

3. Finally, I've compiled all of those files to a general .jic file to load into my EPCS.

However, after programming the .jic file, the Nios II program still not ran. Could anyone tell me how to solve this issue ?