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

Getting Error - While Generate the HEX File form .ELF

Rajeshm
Novice
648 Views

Hi,

I'm using the windows machine - Quartus (Quartus Prime 21.1) Lite Edition.

I'm getting an error when trying to convert .elf to a .hex file. 

 

rajesh@rajesh:/mnt/e/project-1/src$ alt-file-convert.exe -I elf32-littlenios2 -O hex --input=pfr_app.elf --output=pfr_code.hex --base=0x00140000 --end=0x0018bfff --reset=0x00140000 --out-data-width=8 --boot="/mnt/C/intelFPGA_lite/21.1/nios2eds/components/altera_nios2/boot_loader_cfi.srec"


Converting Nios II ELF file to HEX file. Appending boot file.
16 Sep, 2022 10:27:06 AM - (SEVERE) elf2flash: Read error: File not found: /mnt/C/intelFPGA_lite/21.1/nios2eds/components/altera_nios2/boot_loader_cfi.srec
16 Sep, 2022 10:27:06 AM - (SEVERE) elf2flash: Error reading boot copier
16 Sep, 2022 10:27:06 AM - (SEVERE) elf2flash: Error generating Flash file, exiting
ERROR! Unhandled alt-file-convert exception: [WinError 2] The system cannot find the file specified.

 

I read the following link and tried it.

https://www.intel.com/content/www/us/en/support/programmable/articles/000086355.html?wapkw=alt-file-convert

 

I copy the boot_loader_cfi.srec file to the project directory and but still not solved.

 

 

rajesh@rajesh:/mnt/e/project-1/src$ alt-file-convert.exe -I elf32-littlenios2 -O hex --input=pfr_app.elf --output=pfr_code.hex --base=0x00140000
--end=0x0018bfff --reset=0x00140000 --out-data-width=8 --boot=boot_loader_cfi.srec


Converting Nios II ELF file to HEX file. Appending boot file.
ERROR! Unhandled alt-file-convert exception: [WinError 2] The system cannot find the file specified

 

Thanks

Rajesh M

 

0 Kudos
3 Replies
EBERLAZARE_I_Intel
611 Views

Hi,


Apologies for the late first responds as the case was floating before got assigned to me.


Could you take a screen shot of the errors as well?


Also, can you share the necessary files that need to be converted? I will try to replicate from my side.




0 Kudos
EBERLAZARE_I_Intel
593 Views

Hi,


Any update from your side?


0 Kudos
EBERLAZARE_I_Intel
554 Views

Hi,


To work around this problem, follow the steps below:

1.Please copy boot_loader_cfi.srec from installation path and place it in your NiosII software project folder.


I am unsure where, could you do a "ls" and check if the file is on your current directory "/mnt/e/project-1/src", make sure it is there and re-run the command that you used.


p/s: If you find any answer from the community or Intel Support are helpful, please feel free to give best answer or rate 4 or 5 if you ever received a survey.


0 Kudos
Reply