简体   繁体   中英

Clion (embedded development for stm32) CMake not found arm-none-eabi-gcc compiler

I made project like tutorial https://blog.jetbrains.com/clion/2019/02/clion-2019-1-eap-clion-for-embedded-development-part-iii/?gclid=CjwKCAjwhOD0BRAQEiwAK7JHmKUzvoJnORtCn3YxpsSb00Ep_dE0gNQOytiXVgFj6EXOjyCAIH9XTBoCngQQAvD_BwE&gclsrc=aw.ds

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

Add bin folder to PATH by.bashrc. Console command runs good:

$ arm-none-eabi-gcc
arm-none-eabi-gcc: fatal error: no input files

After make project in Clion with STM32CubeMX cmake not configure:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: arm-none-eabi-gcc
CMake Error at CMakeLists.txt:34 (PROJECT):
  The CMAKE_C_COMPILER:

    arm-none-eabi-gcc

  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.

But bin folder already in PATH!!!

Clion see compilers if install toolchail by pacman or copy all content of bin folder to /usr/bin/, but not found other files like nano.specs, nosys.specs, stdint.h and other includes.

I don't know how point Clion and CubeMX right path to toolchain.

It seems that your cmake cannot find C/C++ compiler. In CLion Toolchain setting you can specify paths to compiler (arm-none-eabi-gcc and arm-none-eabi-g++ in your case) or just pass them to CMkae via CMAKE_C_COMPILER and CMAKE_CXX_COMPILER defines.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM