Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Nios not running

Honored Contributor II



I am using a custom board and trying to run a nios processor on a Cyclone IV E fpga. My fpga code is fine, and so is my c code. When I use the "Run As NIOS II Hardware", the code executes fine on my fpga. How can I upload my code to the fpga so I can run it without having it connected to the computer? I have tried the following with no success. 


1. Compile quartus project and get .sof file. 

2. Build nios project and get .elf file. 

3. Convert .sof -> flash and .elf -> flash 

4. Concatenate them into one flash file, and use nios2-elf-objcopy to get hex file. 

5. Use this hex file to create .jic file using quartus "Convert Programming Files". 

6. Use Quartus II Programmer to upload JIC file 


After this, my nios code is not being executed. What can I do to change this? 


Thank you, 

0 Kudos
2 Replies
Honored Contributor II

A few bits of key information are missing: 

  1. You're programming into an EPCS right? 

  2. Have you pointed the Reset Address of the processor at the epcs_controller? 



Also, you need to post the exact commands you're using for this flow. There are switches on these commands (particularly elf2flash and sof2flash) which are mandatory for code residing in EPCS (serial flash) devices to function. 


Finally, you should _still_ be able to connect to the Nios II processor to see where it's at or "thinks" it is (which address does it think it's running from)... 

[UPDATE]: do this last step by connecting to the processor with the IDE without downloaded code (just "connect": It's an option in the launch configuration for the debug session that you can setup in Eclipse) 




0 Kudos
Honored Contributor II

Yes, I am programming into an EPCS4. And yes I have. I have tried using both the NIOS II Flash Programmer and the NIOS II Console, and they are both giving me the same error. I have attached a screenshot. The error seems to be saying that there is no "EPCS Layout Data". Thanks for your response.

0 Kudos