3

I'm having a problem using CLion as Arduino IDE when integrating 3rd-party libraries:

Here is the CMakeList.txt

cmake_minimum_required(VERSION 2.8.4)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)
set(PROJECT_NAME ArduinoIceCream)
project(${PROJECT_NAME})

set(${CMAKE_PROJECT_NAME}_BOARD mega)
set(${CMAKE_PROJECT_NAME}_PORT COM4)
set(mega.build.mcu atmega2560)
LINK_DIRECTORIES(C:\\Users\\Xybrek\\Documents\\Arduino\\libraries)

set(${CMAKE_PROJECT_NAME}_SKETCH ArduinoIceCream.ino)
generate_arduino_firmware(${CMAKE_PROJECT_NAME})

Here is the log:

"C:\Program Files (x86)\JetBrains\CLion 2016.3\bin\cmake\bin\cmake.exe" --build C:\Users\Xybrek\ClionProjects\ArduinoIceCream\cmake-build-debug --target upload -- -j 4
-- Generating ArduinoIceCream
-- Using C:/Program Files (x86)/Arduino/hardware/tools/avr/bin/avr-objcopy.exe for converting firmware image to hex
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Xybrek/ClionProjects/ArduinoIceCream/cmake-build-debug
[ 89%] Built target mega_CORE
Scanning dependencies of target ArduinoIceCream
[ 92%] Building CXX object CMakeFiles/ArduinoIceCream.dir/ArduinoIceCream_ArduinoIceCream.ino.cpp.obj
C:/Users/Xybrek/ClionProjects/ArduinoIceCream/ArduinoIceCream.ino:22:32: fatal error: BasicStepperDriver.h: No such file or directory
 #include "BasicStepperDriver.h"
                                ^
compilation terminated.
CMakeFiles\ArduinoIceCream.dir\build.make:65: recipe for target 'CMakeFiles/ArduinoIceCream.dir/ArduinoIceCream_ArduinoIceCream.ino.cpp.obj' failed
mingw32-make.exe[3]: *** [CMakeFiles/ArduinoIceCream.dir/ArduinoIceCream_ArduinoIceCream.ino.cpp.obj] Error 1
mingw32-make.exe[2]: *** [CMakeFiles/ArduinoIceCream.dir/all] Error 2
CMakeFiles\Makefile2:103: recipe for target 'CMakeFiles/ArduinoIceCream.dir/all' failed
mingw32-make.exe[1]: *** [CMakeFiles/upload.dir/rule] Error 2
CMakeFiles\Makefile2:211: recipe for target 'CMakeFiles/upload.dir/rule' failed
mingw32-make.exe: *** [upload] Error 2
Makefile:169: recipe for target 'upload' failed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.