ARMmbed / ARMmbed/mbed-tools

Missing instructions on how to tell Cmake where to find your compiler

Open
#238 10 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
49
Forks
32
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

The instructions say to have a compiler installed, which I do (ARM GCC 9). I have also installed CMake and added to my path.

I’m on Mac OS X Big Sur.

Cmake is installed here:
/Applications/CMake.app/Contents/bin

GCC for ARM is installed here:
/Applications/ARM/bin

In the prior generation of Mbed tools I set my compiler path with `mbed config -G GCC_ARM_PATH=/Applications/ARM/bin`. However, I don't now how to do that in the new tools.

If I blindly follow the steps in the guide, I get the following error. It appears that Cmake hasn’t been told where the correct compiler is. It is trying to use the Apple version.

```
-- The C compiler identification is AppleClang 11.0.3.11030032
-- The CXX compiler identification is AppleClang 11.0.3.11030032
-- The ASM compiler identification is Clang
-- Found assembler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - broken
-- Configuring incomplete, errors occurred!
See also "/Users/maclob01/Documents/mbed-tools-2/mbed-os-example-blinky/cmake_build/CMakeFiles/CMakeOutput.log".
See also "/Users/maclob01/Documents/mbed-tools-2/mbed-os-example-blinky/cmake_build/CMakeFiles/CMakeError.log".
```

**To Reproduce**
Steps to reproduce the behavior:

1. Follow the guide on a Mac without having anything previously setup
https://os.mbed.com/docs/mbed-os/v6.8/build-tools/use.html

**Expected behavior**
Clear information about how to configure cmake to use the right compiler.

**Screenshots**
n/a

**Desktop (please complete the following information):**
- OS: Mac
- Version: 11.11

**Mbed (please complete the following information):**
- Device: n/a
- Mbed OS Version: n/a
- Mbed CLI 2 Version: 7.4.0

**Additional context**
n/a

Contributor guide

Open the contributing guide

Research direction

Start with the linked Mbed OS v6.8 build-tools/use.html guide and review its compiler and CMake setup steps for macOS. Document how users configure ARM GCC instead of AppleClang, and make the expected successful compiler detection clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, macos
Domain
build-system, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.