Arduino version directory updated to lib/version.txt

Also updated cmake files.
This commit is contained in:
James Goppert 2011-09-29 22:10:26 -04:00
parent 5489b84f8e
commit 9e6b47184a
6 changed files with 91 additions and 105 deletions

View File

@ -1,30 +1,50 @@
#=============================================================================#
# Author: Sebastian Rohde #
# Date: 30.08.2011 #
#=============================================================================#
cmake_minimum_required(VERSION 2.6)
set(CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../")
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Arduino.cmake) # Arduino Toolchain
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) # CMake module search path
string(REGEX REPLACE ".*/" "" PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR})
project(${PROJECT_NAME} C CXX)
#====================================================================#
# Settings #
#====================================================================#
set(FIRMWARE_NAME ArduBoat)
set (CMAKE_CXX_SOURCE_FILE_EXTENSIONS pde)
set(${FIRMWARE_NAME}_BOARD ${BOARD}) # Arduino Target board
find_package(Arduino 22 REQUIRED)
set(${FIRMWARE_NAME}_SKETCHES
ArduBoat.pde
) # Firmware sketches
if (NOT DEFINED BOARD)
message(STATUS "board not defined, assuming mega, use cmake -DBOARD=mega2560 , etc. to specify")
set(BOARD "mega")
endif()
message(STATUS "Board configured as: ${BOARD}")
# need to configure based on host operating system
set(${PROJECT_NAME}_PORT COM2)
set(${PROJECT_NAME}_SERIAL putty -serial COM2 -sercfg 57600,8,n,1,X )
set(${FIRMWARE_NAME}_SRCS
) # Firmware sources
set(${FIRMWARE_NAME}_HDRS
BoatGeneric.h
#CNIBoat.h
ControllerBoat.h
) # Firmware sources
include_directories(
${ARDUINO_LIBRARIES_PATH}/Wire
${CMAKE_SOURCE_DIR}/libraries/APO
${CMAKE_SOURCE_DIR}/libraries/AP_Common
${CMAKE_SOURCE_DIR}/libraries/FastSerial
${CMAKE_SOURCE_DIR}/libraries/ModeFilter
${CMAKE_SOURCE_DIR}/libraries/AP_Compass
${CMAKE_SOURCE_DIR}/libraries/AP_RangeFinder
${CMAKE_SOURCE_DIR}/libraries/AP_GPS
${CMAKE_SOURCE_DIR}/libraries/AP_IMU
${CMAKE_SOURCE_DIR}/libraries/AP_ADC
${CMAKE_SOURCE_DIR}/libraries/AP_DCM
${CMAKE_SOURCE_DIR}/libraries/APM_RC
${CMAKE_SOURCE_DIR}/libraries/GCS_MAVLink
${CMAKE_SOURCE_DIR}/libraries/APM_BMP085
)
set(${FIRMWARE_NAME}_LIBS
add_subdirectory(../libraries "${CMAKE_CURRENT_BINARY_DIR}/libs")
set(${PROJECT_NAME}_BOARD ${BOARD})
file(GLOB ${PROJECT_NAME}_SKETCHES *.pde)
file(GLOB ${PROJECT_NAME}_SRCS *.cpp)
file(GLOB ${PROJECT_NAME}_HDRS *.h)
set(${PROJECT_NAME}_LIBS
c
m
APO
FastSerial
@ -40,33 +60,10 @@ set(${FIRMWARE_NAME}_LIBS
APM_BMP085
ModeFilter
)
#${CONSOLE_PORT}
set(${FIRMWARE_NAME}_PORT COM2) # Serial upload port
set(${FIRMWARE_NAME}_SERIAL putty -serial COM2 -sercfg 57600,8,n,1,X ) # Serial terminal cmd
include_directories(
${CMAKE_SOURCE_DIR}/libraries/APO
${CMAKE_SOURCE_DIR}/libraries/AP_Common
${CMAKE_SOURCE_DIR}/libraries/FastSerial
${CMAKE_SOURCE_DIR}/libraries/ModeFilter
${CMAKE_SOURCE_DIR}/libraries/AP_Compass
${CMAKE_SOURCE_DIR}/libraries/AP_RangeFinder
${CMAKE_SOURCE_DIR}/libraries/AP_GPS
${CMAKE_SOURCE_DIR}/libraries/AP_IMU
${CMAKE_SOURCE_DIR}/libraries/AP_ADC
${CMAKE_SOURCE_DIR}/libraries/AP_DCM
${CMAKE_SOURCE_DIR}/libraries/APM_RC
${CMAKE_SOURCE_DIR}/libraries/GCS_MAVLink
${CMAKE_SOURCE_DIR}/libraries/APM_BMP085
)
#====================================================================#
# Target generation #
#====================================================================#
generate_arduino_firmware(${FIRMWARE_NAME})
generate_arduino_firmware(${PROJECT_NAME})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${FIRMWARE_NAME}.hex
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.hex
DESTINATION bin
)

View File

@ -1,30 +1,50 @@
#=============================================================================#
# Author: Sebastian Rohde #
# Date: 30.08.2011 #
#=============================================================================#
cmake_minimum_required(VERSION 2.6)
set(CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../")
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Arduino.cmake) # Arduino Toolchain
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) # CMake module search path
string(REGEX REPLACE ".*/" "" PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR})
project(${PROJECT_NAME} C CXX)
#====================================================================#
# Settings #
#====================================================================#
set(FIRMWARE_NAME ArduRover)
set (CMAKE_CXX_SOURCE_FILE_EXTENSIONS pde)
set(${FIRMWARE_NAME}_BOARD ${BOARD}) # Arduino Target board
find_package(Arduino 22 REQUIRED)
set(${FIRMWARE_NAME}_SKETCHES
ArduRover.pde
) # Firmware sketches
if (NOT DEFINED BOARD)
message(STATUS "board not defined, assuming mega, use cmake -DBOARD=mega2560 , etc. to specify")
set(BOARD "mega")
endif()
message(STATUS "Board configured as: ${BOARD}")
# need to configure based on host operating system
set(${PROJECT_NAME}_PORT COM2)
set(${PROJECT_NAME}_SERIAL putty -serial COM2 -sercfg 57600,8,n,1,X )
set(${FIRMWARE_NAME}_SRCS
) # Firmware sources
set(${FIRMWARE_NAME}_HDRS
CarStampede.h
#CNIRover.h
ControllerCar.h
) # Firmware sources
include_directories(
${ARDUINO_LIBRARIES_PATH}/Wire
${CMAKE_SOURCE_DIR}/libraries/APO
${CMAKE_SOURCE_DIR}/libraries/AP_Common
${CMAKE_SOURCE_DIR}/libraries/FastSerial
${CMAKE_SOURCE_DIR}/libraries/ModeFilter
${CMAKE_SOURCE_DIR}/libraries/AP_Compass
${CMAKE_SOURCE_DIR}/libraries/AP_RangeFinder
${CMAKE_SOURCE_DIR}/libraries/AP_GPS
${CMAKE_SOURCE_DIR}/libraries/AP_IMU
${CMAKE_SOURCE_DIR}/libraries/AP_ADC
${CMAKE_SOURCE_DIR}/libraries/AP_DCM
${CMAKE_SOURCE_DIR}/libraries/APM_RC
${CMAKE_SOURCE_DIR}/libraries/GCS_MAVLink
${CMAKE_SOURCE_DIR}/libraries/APM_BMP085
)
set(${FIRMWARE_NAME}_LIBS
add_subdirectory(../libraries "${CMAKE_CURRENT_BINARY_DIR}/libs")
set(${PROJECT_NAME}_BOARD ${BOARD})
file(GLOB ${PROJECT_NAME}_SKETCHES *.pde)
file(GLOB ${PROJECT_NAME}_SRCS *.cpp)
file(GLOB ${PROJECT_NAME}_HDRS *.h)
set(${PROJECT_NAME}_LIBS
c
m
APO
FastSerial
@ -40,33 +60,10 @@ set(${FIRMWARE_NAME}_LIBS
APM_BMP085
ModeFilter
)
#${CONSOLE_PORT}
set(${FIRMWARE_NAME}_PORT COM2) # Serial upload port
set(${FIRMWARE_NAME}_SERIAL putty -serial COM2 -sercfg 57600,8,n,1,X ) # Serial terminal cmd
include_directories(
${CMAKE_SOURCE_DIR}/libraries/APO
${CMAKE_SOURCE_DIR}/libraries/AP_Common
${CMAKE_SOURCE_DIR}/libraries/FastSerial
${CMAKE_SOURCE_DIR}/libraries/ModeFilter
${CMAKE_SOURCE_DIR}/libraries/AP_Compass
${CMAKE_SOURCE_DIR}/libraries/AP_RangeFinder
${CMAKE_SOURCE_DIR}/libraries/AP_GPS
${CMAKE_SOURCE_DIR}/libraries/AP_IMU
${CMAKE_SOURCE_DIR}/libraries/AP_ADC
${CMAKE_SOURCE_DIR}/libraries/AP_DCM
${CMAKE_SOURCE_DIR}/libraries/APM_RC
${CMAKE_SOURCE_DIR}/libraries/GCS_MAVLink
${CMAKE_SOURCE_DIR}/libraries/APM_BMP085
)
#====================================================================#
# Target generation #
#====================================================================#
generate_arduino_firmware(${FIRMWARE_NAME})
generate_arduino_firmware(${PROJECT_NAME})
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${FIRMWARE_NAME}.hex
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.hex
DESTINATION bin
)

View File

@ -1,12 +1,10 @@
cmake_minimum_required(VERSION 2.6)
set(CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Arduino.cmake)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Arduino.cmake) # Arduino Toolchain
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules) # CMake module search path
string(REGEX REPLACE ".*/" "" PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR})
project(${PROJECT_NAME} C CXX)
set(FIRMWARE_NAME ${PROJECT_NAME})
set (CMAKE_CXX_SOURCE_FILE_EXTENSIONS pde)
@ -40,7 +38,7 @@ ${CMAKE_SOURCE_DIR}/libraries/APM_BMP085
)
add_subdirectory(../libraries "${CMAKE_CURRENT_BINARY_DIR}/libs")
file(WRITE ${PROJECT_NAME}.cpp "// Do not edit")
set(${PROJECT_NAME}_BOARD ${BOARD})
file(GLOB ${PROJECT_NAME}_SKETCHES *.pde)
file(GLOB ${PROJECT_NAME}_SRCS *.cpp)

View File

@ -1,5 +1,4 @@
// Libraries
#include <WProgram.h>
#include <FastSerial.h>
#include <AP_Common.h>
#include <APM_RC.h>
@ -14,6 +13,7 @@
#include <APM_BMP085.h>
#include <ModeFilter.h>
#include <APO.h>
#include <WProgram.h>
// Vehicle Configuration
#include "PlaneEasystar.h"

View File

@ -1,9 +1,3 @@
cmake_minimum_required(VERSION 2.6)
set(CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../")
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Arduino.cmake)
string(REGEX REPLACE ".*/" "" PROJECT_NAME ${CMAKE_CURRENT_SOURCE_DIR})
project(${PROJECT_NAME} C CXX)

View File

@ -305,7 +305,7 @@ LIBOBJS := $(SKETCHLIBOBJS) $(ARDUINOLIBOBJS)
# Pull the Arduino version from the revisions.txt file
#
# XXX can we count on this? If not, what?
ARDUINO_VERS := $(shell expr `head -1 $(ARDUINO)/revisions.txt | cut -d ' ' -f 2`)
ARDUINO_VERS := $(shell expr `head -1 $(ARDUINO)/lib/version.txt | cut -d ' ' -f 2`)
# Find the hardware directory to use
HARDWARE_DIR := $(firstword $(wildcard $(SKETCHBOOK)/hardware/$(HARDWARE) \