Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Altera_Forum
Honored Contributor I
1,180 Views

Booting Nios from EPCQ-L does not work with Arria 10

Hi, 

 

our hardware is equipped with an EPCQ-L 256 connected to an Arria 10AX048 device (AS x4 mode). For storing the FPGA configuration data and the Nios2 firmware in the EPCQ-L I will use the Quartus programmer and a .jic file. The generation was done with the "Convert file" utility according AN736 

(Nios II Processor Booting From Altera Serial Flash). This procedure I have used successfully in Cyclone 5/ EPCQ projects. 

But in case of Arria 10 after power cycling the board just the .sof is loaded from EPCQ-L, Nios will not boot. I can run the firmware with the Debugger from Eclipse without problems. Are there any differences between the FPGA families or between EPCQ and EPCQ-L? 

Does anyone have used the Serial Flash Controller to boot Nios from EPCQ-L in Arria 10? 

 

regards 

Jens
0 Kudos
4 Replies
Altera_Forum
Honored Contributor I
80 Views

Hi, 

 

Check doc “Developing Nios II software” chapter “Boot Configuration Options” and check that you set correctly (bsp editor): 

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 

hal.linker.enable_alt_load_copy_rodata 

 

Also check that you write nios code at the right addr. Default bootloader is looking for a .sof at addr_0 and the nios code must be placed just after this 1st sof. 

 

What is exactly your booting process? If you are using "booting from flash and running from onchip memory" I would suggest "Booting and Running From FPGA Memory", at least to test nios booting. 

Then you can init you onchip memory with an .hex file containing your Nios code.  

With this method you don't have to manage bootloaders or nios download from flash. Each .sof image you have on Flash has it own nios and you just have to select a sof file with remote update ip. 

 

hope it helps. 

 

Regards. 

 

ps: do you use Altera EPCS-L? I don't have any A10 board yet but I think I will try S25FS256S or equivalent for ASx4 

 

script example for hex file:# convert nios from .elf to .hex 

echo "***************************************" 

echo "* .ELF to .HEX *" 

elf2hex --base=0x00 --end=0x3FFFFF --width=32 --little-endian-mem --no-zero-fill --input=project_name.elf --output=onchip.hex --verbose# copy .hex file to fpga folder 

echo "***************************************" 

echo "* CP *" 

cp onchip.hex ../../ 

cd ../..# update fpga programming files with new nios 

echo "***************************************" 

echo "* Update output files *" 

quartus_cdb BDFTOP -c BDF_TOP --update_mif 

quartus_asm --read_settings_files=off --write_settings_files=off BDFTOP -c BDF_TOP 

echo "* END *" 

echo "***************************************"
Altera_Forum
Honored Contributor I
80 Views

Jens, 

Did you ever find a solution to this problem? I am having the same issue. 

 

Thanks, 

John
Altera_Forum
Honored Contributor I
80 Views

Hi Jon, 

 

I found the solution with the Small Boot Copier Example from "Alternative Nios II Boot Methods" in AN-458: 

 

https://www.altera.com/support/support-resources/design-examples/intellectual-property/embedded/nios... 

 

I'm using the Small Boot Copier, it works fine with EPCQ-L256 and EPCQL-1024. 

 

The Default Boot Copier does not work with both. 

 

 

Jens
Altera_Forum
Honored Contributor I
80 Views

Oh, sorry for the spelling mistake!  

Of course I meant John