- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I dont think I should have "--epcs" mode set for QSPI?
if I remove that then I can add "--base" and "--reset".
That only leaves "--out-data-width=8" - I take it I dont need that for QSPI either
Also "-I elf32-littlenios2" and "-O hex" are superfluous for elf2flash I take it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Could you try the command below:
nios2-elf-objcopy -O ihex file.elf output_file.hex
Regards
Jingyang, Teh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
nios2-elf-objcopy is not recognised by niosv command shell.
Moreover I got elf2flash to create a hexfile but when I use 'convert programming file' in Quartus to create a pof file for qspi programming , I discover that the hexfile isnt Intel format which it meeds to be for it to work!
So I reiterate:
What is the NiosV equivalent of the Nios2 command?:
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"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems elf2flash creates an s-record file which is no good .
I need an equivalent for alt-file-convert.exe which created an Intel hex file!!!
I think I can use a 3rd party hex editor to convert between s-records and Intel Hex though, I can try that.
elf2hex creates an Intel hex file but doesnt allow a bootloader to be added, although the command line doesnt complain when I add it!
I tried it and it created a file 78MB which is an order of magnitude bigger than it should be.
It seems to me Nios V toolset isnt ready for me to replace Nios II .
Moreover Platform designer in the Pro version of Quartus has a BSP editor. Thats all very well but Quartus Pro doesnt support MAX10!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
The nios2-elf-obj is available under the nios2 command shell.
To launch you can use the nios2-elf-objcopy.exe shown below:
Regards
Jingyang, Teh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Any update on this case?
Have you managed to locate the exe in your windows system?
Regards
Jingyang, Teh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats the point I am trying to use Nios V not Nios II !!!!!
Please try reading the thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Sorry for the confusion.
For the NiosV there is a new tool to be used for creating the hex for bootloader.
The command tool to used is :
elf2flash --input software/app/debug/<Nios V application>.elf \
--output flash.srec --reset <reset offset + base address of GSFI AVL MEM> \
--base <base address of GSFI AVL MEM> \
--end <end address of GSFI AVL MEM>
riscv-none-embed-objcopy --input-target srec --output-target ihex \
flash.srec <Nios V application>.hex
Instead of one command to generate the hex it is separated into 2 steps.
Regards
Jingyang, Teh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats great - just what I wanted..
One more thing:
My Nios2 haad use of Exception Vector set within Platform designer.
For Nios V it must be set with the Nios V command shell because MAX10 doesnt have a BSP editor!
Any advice how I do that with the niosv-bsp command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry I was bit hasty there..
riscv-none-embed-objcopy doesnt exist in Quartus 23.1 std/lite edition.. The documentation is incorrect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
For the NiosV they make the exception vector editable in the BSP Editor.
You are able to change the exception vector in the BSP Editor under the BSP linker script.
Which doc you referring to that uses the riscv-none-embed-objcopy ?
Regards
Jingyang, Teh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
riscv-none-embed-objcopy is in your reply dated 20th June.
Once again, I repeat, BSP editor is only available in Quartus Pro and Quartus Pro doesnt support MAX10!!
Nios V isnt properly supported it seems - if you want me to migrate from Nios2 to NiosV then Intel need to sort the tools out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is the answer to one issue..
https://www.intel.com/content/www/us/en/support/programmable/articles/000092029.html?wapkw=riscv32-unknown-elf-objcopy
Still an answer to this..
One more thing:
My Nios2 had use of Exception Vector which was enabled in the NiosII IP within Platform designer.
For Nios V it must be set with the Nios V command shell because only Quartus Pro has BSP editor in Platform Designer and Quartus Pro doesnt support MAX10.!
Any advice how I do that with the niosv-bsp command?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
For the Max10 that is using the FPGA Std/lite.
You could launch the BSP-editor manually using the command line.
Launch the niosv-command shell and enter the command "niosv-bsp-editor"
If you could not find the niosv-command shell, it is located here.
Regards
Jingyang, Teh
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page