question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mbed cli v1.10.0 - GCC_ARM, ARMC6 config needs to have /bin in path, other compilers may not

See original GitHub issue

Version info:

  • OS - Linux / Ubuntu 16.04.
  • mbed --version 1.10.0

Repro steps:

Download and get gcc arm : https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads

Unarchive it for example under your user folder, i.e. /home/user, for example

jankii01@ubuntu:~/gcc-arm-none-eabi-8-2019-q3-update$ pwd
/home/jankii01/gcc-arm-none-eabi-8-2019-q3-update

Go to one of your mbed examples and configure mbed cli’s path to GCC ARM:

jankii01@ubuntu:~/mbed/mbed-client-testapp$ mbed config -G GCC_ARM_PATH "/home/jankii01/gcc-arm-none-eabi-8-2019-q3-update"

Try compiling, it will fail.

jankii01@ubuntu:~/mbed/mbed-cloud-client-example$ mbed config -G GCC_ARM_PATH "/home/jankii01/gcc-arm-none-eabi-8-2019-q3-update"
[mbed] /home/jankii01/gcc-arm-none-eabi-8-2019-q3-update now set as global GCC_ARM_PATH
jankii01@ubuntu:~/mbed/mbed-cloud-client-example$ mbed compile -m K64F -t GCC_ARM
[mbed] Working path "/home/jankii01/mbed/mbed-cloud-client-example" (program)
[mbed] WARNING: Missing Python modules were not auto-installed.
       The Mbed OS tools in this program require the following Python modules: hidapi, pywin32, wmi
       You can install all missing modules by running "pip install -r requirements.txt" in "/home/jankii01/mbed/mbed-cloud-client-example/mbed-os"
       On Posix systems (Linux, etc) you might have to switch to superuser account or use "sudo"
---
Could not find executable for GCC_ARM.
Currently set search path: /home/jankii01/gcc-arm-none-eabi-8-2019-q3-update
[mbed] ERROR: "/usr/bin/python" returned error.
       Code: 2
       Path: "/home/jankii01/mbed/mbed-cloud-client-example"
       Command: "/usr/bin/python -u /home/jankii01/mbed/mbed-cloud-client-example/mbed-os/tools/make.py -t GCC_ARM -m K64F --source . --build ./BUILD/K64F/GCC_ARM"
       Tip: You could retry the last command with "-v" flag for verbose output
---

Add the /bin to the path, and it suddenly works.

jankii01@ubuntu:~/mbed/mbed-cloud-client-example$ mbed config -G GCC_ARM_PATH "/home/jankii01/gcc-arm-none-eabi-8-2019-q3-update/bin"
[mbed] /home/jankii01/gcc-arm-none-eabi-8-2019-q3-update/bin now set as global GCC_ARM_PATH
jankii01@ubuntu:~/mbed/mbed-cloud-client-example$ mbed compile -m K64F -t GCC_ARM
[mbed] Working path "/home/jankii01/mbed/mbed-cloud-client-example" (program)
[mbed] WARNING: Missing Python modules were not auto-installed.
       The Mbed OS tools in this program require the following Python modules: hidapi, pywin32, wmi
       You can install all missing modules by running "pip install -r requirements.txt" in "/home/jankii01/mbed/mbed-cloud-client-example/mbed-os"
       On Posix systems (Linux, etc) you might have to switch to superuser account or use "sudo"
---
[Warning] @,: Compiler version mismatch: Have 8.3.1; expected version >= 6.0.0 and < 7.0.0
Building project mbed-cloud-client-example (K64F, GCC_ARM)
Scan: mbed-cloud-client-example
Using ROM regions bootloader, header, application in this build.
  Region bootloader: size 0x8000, offset 0x0
  Region header: size 0x70, offset 0xa000
  Region application: size 0xf5c00,

However, IAR and ARM C work differently - there you may not add /bin to the path, or they fail.

Requirement: all compiler paths should work in the same way.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
JanneKiiskilacommented, Aug 28, 2019

I would not prefer to have them in the path, if you need to use multiple versions of the compilers - it’s easier just to use mbed config rather than modify the path.

0reactions
mark-edgeworthcommented, Dec 4, 2019

As this is covered by the documentation I’m closing…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mbed CLI can't find executable for gcc_arm. - Question
Mbed CLI can 't find executable for gcc_arm. Hi, I have a problem compiling in mbed CLI. That's what i do: I first...
Read more >
configure ARMC6 in mbed-cli - Question
Compiling "mbed-os-example-blinky" using GCC_ARM toolchain completes successfully. Documentation says that mbed-cli should also work with "-t ARM" (uses ARMC5 ...
Read more >
Install and set up - Build tools | Mbed OS 6 Documentation
Configure compiler location with Mbed CLI. If you cannot place the compiler in the system PATH, or if you have to use a...
Read more >
Switching to GCC - Installing | Mbed Studio Documentation
You do not need to change the path from GCC's to ARMC6's; Mbed Studio assumes the default path to ARMC6. Restart Mbed Studio...
Read more >
System include path missing? - Mbed CLI
Hi! I'm new to Mbed OS and hitting an unfound include which is one of the standard includes. with mbed compile -m DISCO_F746NG...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found