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++

Boot from EPCS

Altera_Forum
Honored Contributor II
1,257 Views

Hello, I have a problem booting from EPCS. 

 

Using flash programmer, I wrote FPGA configuration data & elf file to EPCS, but booting fails. 

The following is my flash programmer setting: 

 

--------------------------------------- 

(disabled) Program software project to flash memory 

 

(enabled) Program FPGA configuration data into hardware-image region of flash memory 

FPGA Configuration(SOF): C:\....\niosII_cyclone_1c12_eval\standard\standard_eval_board.sof 

Hardware Image: epcs: U2 + 0x0 

 

(enabled) Program a file into flash memory 

File: C:\.....\niosII_cyclone_1c12_eval\standard\software\hello_led_0\Debug\hello_led_0.elf 

Memory: epcs_controller(U2) 

Offset: 0x00060000 

----------------------------------------- 

 

Reset address is set to epcs_controller. 

I am using the board that came with "Nios II Evaluation Kit" as a target device. 

BUT, As for Quartus II, I am using the FULL VERSION that came with "Nios II Development Kit". 

 

Am I doing something wrong? 

Any advice will be great.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
361 Views

Versions I am using are: 

Quartus II -> 5.0 

Nios II IDE -> 5.0
0 Kudos
Altera_Forum
Honored Contributor II
361 Views

Hi Fuji, 

 

To make this work you'll need to do two things: 

 

1. Make sure that the CPU reset location is set to EPCS flash. This is done in SOPC Builder in the "More CPU settings" page. After making this change you will need to re-generate in SOPC Builder and re-compile the design in Quartus, as the reset location must be compiled into hardware. 

 

2. In the flash programmer GUI, DO select the "Program software project into flash memory", DO NOT check "Program other file into flash memory", with the .elf file. 

 

Reason: programming the .elf file in this way will not work; the contents of the .elf are parsed by the flash programmer and only address:data records written into flash. Selecting "program software project into flash" will direct the flash programmer to do this, if the reset address is pointed to EPCS.
0 Kudos
Altera_Forum
Honored Contributor II
361 Views

Thank you Jesse, 

 

It seems that (2) was my problem. 

However, (1) was also a problem I realized before posting here. 

 

Until I got your answer, I counld't figure out why "Program software project to flash memory" didn't have any pull down list to specify the device or the offset. 

 

I didn't think that NIOS II IDE refers to any script made by QuartusII or SOPC Builder(I hope I'm correct..). 

 

But now the problem is solved. 

 

Once again, I appreciate your prefect advice!
0 Kudos
Reply