I am new to mbed and trying to compile (and download for the Nordic NRF52840_DK breakout board) the mbed-os-example-ble\BLE_Advertising project. I have installed mbed CLI 2 per instrictions on windows 10 computer Install or upgrade. I pulled the mbed-os-example-ble repository and built the BLE_Advertising project according to the instructions Running the examples. I pulled in the lates mbed-os ( mbed-os-6.15.1) with the CLI command mbed-tools deploy.
When I execute the compile command C:\...\mbed-os-example-ble\BLE_Advertising>mbed-tools compile -m NRF52840_DK -t ARM
I get the following error output
Configuring project and generating build system...
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: armclang
CMake Error at mbed-os/tools/cmake/app.cmake:27 (enable_language):
The CMAKE_C_COMPILER:
armclang
is not a full path and was not found in the PATH.
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
CMakeLists.txt:10 (include)
CMake Error at mbed-os/tools/cmake/app.cmake:27 (enable_language):
The CMAKE_CXX_COMPILER:
armclang
...
My CMake (v3.22.1) was installed to my C:\Program Files\CMake directory.
I tried adding CC, CXX, and ASM environemnt variables, like the following, but always get the same error/failure.
I did not have a separate ARM compiler installed (other than what mbed studio was using). After installing the GNU ARM Embedded toolchain and choosing to have it be added to my PATH statement, the compile worked.