Article ID: 000075763 Content Type: Troubleshooting Last Reviewed: 09/11/2012

Why do I receive "File format not recognized" error message when converting an .srec to .hex using the nios2-elf-objcopy command?

Environment

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Description

The nios2-elf-objcopy command in Nios® II Command Shell v10.0 [gcc4] fails to recognize the S-Record (SREC) file format (.flash).

A  typical example of this issue is illustrated below:

bash-3.1$ nios2-elf-objcopy --input-target srec --output-target ihex my_input.flash my_output.hex "C:\altera\10.0\nios2eds\bin\gnu\H-i686-mingw32\bin\nios2-elf-objcopy.exe: my_input.flash: File format not recognized"

To workaround this issue, use one of the following methods:

  • Temporarily use the legacy Nios II Command Shell v10.0 [gcc3]
    This can be accessed in Windows environment: From Start menu-> All programs -> Altera -> Nios II 10.0 EDS -> Legacy Nios II Tools -> Nios II 10.0 Command Shell [gcc3]

OR

  • Relace the nios2-elf-objcopy.exe located in Nios II EDS installation directory path i.e. C:\altera\10.0\nios2eds\bin\gnu\H-i686-mingw32\bin with the nios2-elf-objcopy.exe located in C:\altera\10.0\nios2eds\bin\nios2-gnutools\H-i686-pc-cygwin\bin

Related Products

This article applies to 1 products

Intel® Programmable Devices