Konstantin18ko
@Konstantin18ko
Стоматолог

Сборка CMake для работы с Arduino в Clion?

CMakeLists.txt
cmake_minimum_required(VERSION 2.8.4)
set(ARDUINO_SDK_PATH ${CMAKE_SOURCE_DIR}/Arduino)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)
set(CMAKE_CXX_STANDARD 98)
set(PROJECT_NAME nfcrfid)
project(${PROJECT_NAME})
set(${PROJECT_NAME}_BOARD uno)
# set(${<@PROJECT_NAME@>}_SRCS)
# set(${<@PROJECT_NAME@>}_HDRS)
# set(${<@PROJECT_NAME@>}_LIBS)
# link_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
# add_subdirectory()
# set(${<@PROJECT_NAME@>}_SKETCH untitled.ino)
# set(${<@PROJECT_NAME@>}_PROGRAMMER avrispmkii)
set(${PROJECT_NAME}_PORT COM3)
# set(${<@PROJECT_NAME@>}_AFLAGS -v)
set(uno.upload.speed 9600)
generate_arduino_firmware(${PROJECT_NAME})

Вот что выводит в логе:

"C:\Program Files\JetBrains\CLion 2019.2.3\bin\cmake\win\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" C:\Users\18ko\CLionProjects\untitled
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: C:/Users/18ko/CLionProjects/untitled/Arduino/hardware/tools/avr/bin/avr-gcc.exe
CMake Error at C:/Users/18ko/CLionProjects/untitled/cmake/ArduinoToolchain.cmake:85 (message):
Could not find Arduino SDK (set ARDUINO_SDK_PATH)!
Call Stack (most recent call first):
C:/Users/18ko/CLionProjects/untitled/cmake-build-debug/CMakeFiles/3.15.3/CMakeSystem.cmake:6 (include)
C:/Users/18ko/CLionProjects/untitled/cmake-build-debug/CMakeFiles/CMakeTmp/CMakeLists.txt:3 (project)

CMake Error at C:/Program Files/JetBrains/CLion 2019.2.3/bin/cmake/win/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:44 (try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
CMakeLists.txt:6 (project)

-- Configuring incomplete, errors occurred!
See also "C:/Users/18ko/CLionProjects/untitled/cmake-build-debug/CMakeFiles/CMakeOutput.log".
See also "C:/Users/18ko/CLionProjects/untitled/cmake-build-debug/CMakeFiles/CMakeError.log".

[Failed to reload]


Я же указываю откуда брать ARDUINO_SDK_PATH, почему он ругается?
  • Вопрос задан
  • 380 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы