Problem with CMake and rosserial_arduino
Hi guys,
When I'm trying to go through this tutorial in my OS X 10.6: http://www.ros.org/wiki/rosserial_arduino/Tutorials/CMake
I have the ARDUINO_SDK_PATH-NOTFOUND problem mentioned, so I add set(ARDUINO_SDK_PATH <path_to_arduino_installation>) into my CMakeLists.txt. Here is the whole CMakeLists.txt:
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_find_ros_package(rosserial_arduino)
set(ARDUINO_SDK_PATH /Applications/Arduino.app/Contents/Resources/Java)
include(${rosserial_arduino_PACKAGE_PATH}/cmake_scripts/rosserial.cmake)
set(FIRMWARE_NAME chatter)
set(${FIRMWARE_NAME}_BOARD uno) # Arduino Target board
set(${FIRMWARE_NAME}_SRCS src/chatter.cpp )
set(${FIRMWARE_NAME}_PORT /dev/tty.usbmodem411) # Serial upload port
generate_ros_firmware(${FIRMWARE_NAME})
But when I'm try to compile it, I have got the following error:
[ 6%] Building CXX object CMakeFiles/uno_CORE.dir/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp.o
make[3]: avr-g++: No such file or directory
make[3]: *** [CMakeFiles/uno_CORE.dir/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/HardwareSerial.cpp.o] Error 1
make[2]: *** [CMakeFiles/uno_CORE.dir/all] Error 2
make[1]: *** [CMakeFiles/chatter.dir/rule] Error 2
make: *** [chatter] Error 2
I know it cannot find avr-g++, but I have already point out the ARDUINO_SDK_PATH, so I think something is missing. I have no problem when I use Arduino IDE to do compile the same code. Do you guys know how to solve this problem? Thanks!