hex2bin.exe: command not found (Error 127)

Universal CAN Converter
Post Reply
User avatar
M.Gerber
Design & Documentation
Design & Documentation
Posts: 65
Joined: Mon 13. Sep 2010, 16:34

hex2bin.exe: command not found (Error 127)

Post by M.Gerber » Wed 12. Aug 2015, 15:41

Hi!

For compiling our code examples under Windows, we currently provide the GNU ARM toolchain Yagarto. If, for any reason, you updated the make tool to a more recent version (part of MinGW) or if you are using another environment for compiling, you might run into the following problem after starting "make all" (last lines of the console output):

Code: Select all

Creating bin file example_ser.bin
cp example_ser.hex temp.hex
hex2bin.exe -s 0000 temp.hex
sh: hex2bin.exe: command not found
make: *** [example_ser.bin] Error 127
In this case, the make tool does not find hex2bin.exe in the current working directory.

There are two options to solve the problem:
  1. Adapt the makefile in the root directory of the source example.
    1. Open makefile in a text editor.
    2. Find the following line:

      Code: Select all

      HEX2BIN = hex2bin.exe
    3. Replace it with this line:

      Code: Select all

      HEX2BIN = ./hex2bin.exe
      "./" as prefix for hex2bin.exe looks for the executable in the current directory (but nowhere else).
    4. Don't forget to save the file. ;)
  2. [Recommended] Copy the hex2bin.exe file from the root directory of the source example to a directory that is contained in the search path (Windows environment variable PATH).
    For example, this is usually the case with the installation directory of the Yagarto Tools (C:\yagarto-tools-20121018).
Happy coding!

Mark

Post Reply