ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Still have problem. I tried the tutorial and CMake scripts from original arduino_cmake: https://github.com/queezythegreat/arduino-cmake
That works on my OS X. So I tried to look into these scripts. In original top CMakeLists.txt, there are two lines:
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) # CMake module search path
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Arduino.cmake) # Arduino Toolchain
But in rosserial.cmake in rosserial_arduino package, these two lines become:
set(CMAKE_MODULE_PATH ${rosserial_arduino_PACKAGE_PATH}/cmake_scripts/modules) # CMake module search path
include(${rosserial_arduino_PACKAGE_PATH}/cmake_scripts/toolchains/Arduino.cmake) # Arduino Toolchain
So I changed them into
set(CMAKE_MODULE_PATH ${rosserial_arduino_PACKAGE_PATH}/cmake_scripts/modules) # CMake module search path
set(CMAKE_TOOLCHAIN_FILE ${rosserial_arduino_PACKAGE_PATH}/cmake_scripts/toolchains/Arduino.cmake) # Arduino Toolchain
Now I have following error:
cc1plus: error: unrecognized command line option "-mmcu=atmega328p"
make[2]: *** [CMakeFiles/uno_CORE.dir/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp.o] Error 1
make[1]: *** [CMakeFiles/uno_CORE.dir/all] Error 2
make: *** [all] Error 2
I'm not a CMake guy, so is there anyone can help me to solve this problem? Thanks!
BTW the arduino installation path in OS X is
/Applications/Arduino.app/Contents/Resources/Java