Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.

NIOS SDRAM and DE2 board boot

Altera_Forum
Honored Contributor I
1,212 Views

Hi, i have a niosii using SDRAM because the memory inside cyclone ii is not sufficient. All is fine. The hardware and the software run fine but now i would like that the board boots on this project when i switch on. I found some information to make this but using flash memory but i can't understand how to do this with "only" SDRAM. May be using EPCS circuit form the DE2 board and adding EPCS controller in niosii ? Someone could help me ? 

Thanks 

Eric
0 Kudos
2 Replies
Altera_Forum
Honored Contributor I
102 Views

You need to study the Nios II Embedded Design Handbook. Chapter 3 describes how to do this in great detail. You should probably download the whole Nios II documentation package from https://www.altera.com/products/processors/support.html Pick the the zip file that corresponds to the version of Quartus you are using.

Altera_Forum
Honored Contributor I
102 Views

Thank you for your reply. I carefully read the chapter describing "Application boot loading and programming system memory". But it still does not work as i expect so i think i misunderstand something ... 

I add EPCS serial flash controller in qsys and i select epcs_flash_controller in the nios2 reset vector and sdram_controller for the exception vector. I regenerate the sopc, restart the quartus compilation and program the device. In Eclipse, i set hal.linker.allow_code_at_reset, hal.linker.enable_alt_load, hal.linker.enable_alt_load_copy_rwdata, hal.linker.enable_alt_load_copy_exceptions and hal.linker.enable_alt_load_copy_rodata to 0. I select the bsp, right click and select make target/build and Select  

mem_init_generate, Click Build and add meminit.qip to the quartus project. I restart the quartus compilation ans program the device. 

After that in eclipse, i open the flash programmer in file/ New i select the sopcinfo file. Add the sof file and the elf file. Launch start. 

The command lines generated are :  

 

elf2flash --input="C:/Users/tanguy-e/Desktop/test-projet-M1/partie-5/software/test_nios2/test_nios2.elf" --output="C:/Users/tanguy-e/Desktop/test-projet-M1/partie-5/flash/test_nios2_epcs_flash_controller_0.flash" --epcs --after="C:/Users/tanguy-e/Desktop/test-projet-M1/partie-5/flash/premier_nios2_epcs_flash_controller_0.flash" --verbose  

 

nios2-flash-programmer "C:/Users/tanguy-e/Desktop/test-projet-M1/partie-5/flash/test_nios2_epcs_flash_controller_0.flash" --base=0x1001000 --epcs --sidp=0x1002050 --id=0x1 --timestamp=1466410227 --device=1 --instance=0 '--cable=USB-Blaster on localhost [USB-0]' --program --verbose --go  

 

The card seems to boot the nios2 processor but not the program because nothing happens. 

 

What i do wrong ? 

Thanks 

Eric
Reply