Forum Discussion
NiosV
Hi I am in the process of converting a MAX10 Nios2 design to a MAX10 NiosV. It boots from Flash loaded into DDR
All is good with the compiling apart from I need to convert the elf file to a hex file.
Nios2 was done with Eclipse tools and it created the script
alt-file-convert.exe -I elf32-littlenios2 -O hex --input=app.elf --output=mem_init/ext_flash.hex --base=0x44000000 --end=0x45ffffff --reset=0x44430000 --out-data-width=8 --boot="C:\intelfpga_lite\23.1std\nios2eds\components\altera_nios2\boot_loader_cfi.srec"
Now i have to use NiosV command line to do the same, but the alt-file-convert.exe command doesnt exist.
I think it may be something like this:
elf2flash --input=sw/app/build/app.elf --output=sw/app/build/mem_init/ext_flash.hex --epcs –-offset 0x0 --end=0x45ffffff --boot="C:/intelFPGA_lite/23.1std/niosv/components/bootloader/niosv_g_bootloader"
Note the --base and --reset that alt-file-convert.exe used can't be used with elf2flash - is that
correct?
32 Replies
- tehjingy_Altera
Regular Contributor
Hi
The niosv_g_bootloader.srec should work for bootloader for booting from QSPI.
That is weird why it is not working on your QSPI Flash.
Could you try executing in place from QSPI just to see the access to QSPI is working?
Regards
Jingyang, Teh
- NGord
Occasional Contributor
You are right , it doesnt execute from QSPI flash. So the issue isnt so much the bootloader, but the NiosV isnt reading QSPI Flash at all.
Same software/hardware/ QSYS works with Nios2. Only difference is Nios2 swapped with NiosV.
My Flash is Micron MT25QL256 and I use the quartus.ini pgm_allow_mt25q=on.
I tried Niosv-m and Niosv-g. Neither seem to run from Flash.
I am using Generic QUAD SPI controller II Intel FPGA IP which worked with Nios2 . Should I be using Generic Serial Flash Interface Intel FPGA IP as stated in the Embedded Design Handbook? Shouldnt have to.- NGord
Occasional Contributor
I inspected the QSPI signals on the board and all are moving. The clock is at the correct speed.
- tehjingy_Altera
Regular Contributor
Hi
Just to check for executing in place for flash, did you disable the GSFI HAL Driver in the BSP?
4.5.1.1.2. Software Design Flow (intel.com)
Regards
Jingyang, Teh
- NGord
Occasional Contributor
No- first time I have seen that requirement!
Disabling GSFI is only when using alt_load to run code from Flash.
It has to be enabled for using bootloader running from RAM.
However - the point is the hexfile has to be Big endian for NiosV conversion to .pof file. Nios2 had to be Little endian, that fixes it.
First time I ever saw that!!! Its a major difference. AN978 never mentions such a difference.
You can close this now. Thanks.
- tehjingy_Altera
Regular Contributor
Hi
Sorry about that.
Have created a feedback to add this in the migration guide for NiosV.
They are mentioned here for driver disablement for GSFI when executing in place.
For the endian needed it is mentioned here:
I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com/s/?language=en_US’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.
Regards
Jingyang, Teh