Arm Mbed OS support forum

GCC_ARM_PATH error compiling with Windows Subsystem for Linux

Using mbed-cli v1.10.2, I get the following error:

jgreene  /c/Users/ssc27/Projects/VoBoNode   master  mbed compile
[mbed] Working path "/c/Users/ssc27/Projects/VoBoNode" (program)
[OS ERROR] Command: /c/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/arm-none-eabi-gcc --version
[ERROR] [Errno 2] No such file or directory
[mbed] ERROR: "/usr/bin/python" returned error.
   Code: 1
   Path: "/c/Users/ssc27/Projects/VoBoNode"
   Command: "/usr/bin/python -u /c/Users/ssc27/Projects/VoBoNode/mbed-os/tools/make.py -t GCC_ARM -m MTS_MDOT_F411RE --source . --build ./BUILD/MTS_MDOT_F411RE/GCC_ARM"
   Tip: You could retry the last command with "-v" flag for verbose output

I suspect that the problem is being caused by spaces or something in the folder names but have tried various formats without any luck. I did confirm that the path to “arm-none-eabi-gcc” is correct, though. Anyone have any ideas how to resolve this?

Hello John,

Try to enclose the path’s sections containing spaces with double quotes as below:

/c/"Program Files (x86)/GNU Tools ARM Embedded"/"6 2017-q2-update"/bin/arm-none-eabi-gcc --version

Thanks for the feedback, @hudakz. I really appreciate it.

I tried 2 variations on your suggestion which both produced seemingly identical error outputs (see below). The path as shown on the “[OS ERROR]” lines appear to be correct. So, the path string seems to be getting passed correctly but for whatever reason the build still errors out on it. Very odd. Any other suggestions?

  1. Putting each individual folder with spaces in a set of quotes:

 jgreene  /c/Users/ssc27/Projects/VoBoNode   master  mbed config -G GCC_ARM_PATH  /c/"Program Files (x86)"/"GNU Tools ARM Embedded"/"6 2017-q2-update"/bin
[mbed] /c/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin now set as global GCC_ARM_PATH
 jgreene  /c/Users/ssc27/Projects/VoBoNode   master  mbed compile
[mbed] Working path "/c/Users/ssc27/Projects/VoBoNode" (program)
[OS ERROR] Command: /c/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/arm-none-eabi-gcc --version
[ERROR] [Errno 2] No such file or directory
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/c/Users/ssc27/Projects/VoBoNode"
       Command: "/usr/bin/python -u /c/Users/ssc27/Projects/VoBoNode/mbed-os/tools/make.py -t GCC_ARM -m MTS_MDOT_F411RE --source . --build ./BUILD/MTS_MDOT_F411RE/GCC_ARM"
       Tip: You could retry the last command with "-v" flag for verbose output
---
  1. Surrounding all 3 folders containing spaces in a single pair of quotes:

 ✘ jgreene  /c/Users/ssc27/Projects/VoBoNode   master  mbed config -G GCC_ARM_PATH  /c/"Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update"/bin
[mbed] /c/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin now set as global GCC_ARM_PATH
 jgreene  /c/Users/ssc27/Projects/VoBoNode   master  mbed compile
[mbed] Working path "/c/Users/ssc27/Projects/VoBoNode" (program)
[OS ERROR] Command: /c/Program Files (x86)/GNU Tools ARM Embedded/6 2017-q2-update/bin/arm-none-eabi-gcc --version
[ERROR] [Errno 2] No such file or directory
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 1
       Path: "/c/Users/ssc27/Projects/VoBoNode"
       Command: "/usr/bin/python -u /c/Users/ssc27/Projects/VoBoNode/mbed-os/tools/make.py -t GCC_ARM -m MTS_MDOT_F411RE --source . --build ./BUILD/MTS_MDOT_F411RE/GCC_ARM"
       Tip: You could retry the last command with "-v" flag for verbose output
---

Open a terminal window and first try:
ls /c/"Program Files (x86)"
If it works then extent the path and try:
ls /c/"Program Files (x86)"/"GNU Tools ARM Embedded"

Continue extending the path step by step until you reach a point when it fails.

I’m embarassed I did not think of that to try, @hudakz . Unfortunately, though, it never fails and “ls” shows the correct executable arm-none-eabi-gcc.exe is present in the correct folder. I’m wondering if the “.exe” file extension is messing something up.

 jgreene  /c/Users/ssc27/Projects/VoBoNode   master  ls /c/"Program Files (x86)"/"GNU Tools ARM Embedded"/"6 2017-q2-update"/bin
arm-none-eabi-addr2line.exe  arm-none-eabi-gcc-6.3.1.exe   arm-none-eabi-gdb-py.exe   arm-none-eabi-ranlib.exe
arm-none-eabi-ar.exe         arm-none-eabi-gcc-ar.exe      arm-none-eabi-gdb.exe      arm-none-eabi-readelf.exe
arm-none-eabi-as.exe         arm-none-eabi-gcc-nm.exe      arm-none-eabi-gprof.exe    arm-none-eabi-size.exe
arm-none-eabi-c++.exe        arm-none-eabi-gcc-ranlib.exe  arm-none-eabi-ld.bfd.exe   arm-none-eabi-strings.exe
arm-none-eabi-c++filt.exe    arm-none-eabi-gcc.exe         arm-none-eabi-ld.exe       arm-none-eabi-strip.exe
arm-none-eabi-cpp.exe        arm-none-eabi-gcov-dump.exe   arm-none-eabi-nm.exe       gccvar.bat
arm-none-eabi-elfedit.exe    arm-none-eabi-gcov-tool.exe   arm-none-eabi-objcopy.exe
arm-none-eabi-g++.exe        arm-none-eabi-gcov.exe        arm-none-eabi-objdump.exe

You are right. There is no arm-none-eabi-gcc file because the extension (".exe" included) belongs to the file name. But I’m afraid if there was an arm-none-eabi-gcc binary file Linux would not be capable to execute it because the Windows binary format is different :frowning: To run a Windows executable on Linux I usually use wine but even that does not work with all Windows programs.
I seems that you have to install a GCC-ARM package also on Linux.

Makes sense. Thanks again for all of the help.

Worked like a charm after I installed the Linux version directly into WSL @hudakz. Once again, not sure why I did not think of that! :face_with_raised_eyebrow:

As always, your sage feedback/guidance is greatly appreciated.