Rebase changes on upstream master

This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2016-02-19 16:59:43 +01:00
committed by Julian Oes
parent 2938d23c6c
commit 014f15d8b0
28 changed files with 254 additions and 172 deletions
@@ -83,6 +83,7 @@ set(config_module_list
modules/attitude_estimator_q
modules/ekf_att_pos_estimator
modules/position_estimator_inav
modules/ekf2
#
# Vehicle Control
+22 -5
View File
@@ -1,5 +1,11 @@
include(qurt/px4_impl_qurt)
if ("$ENV{EAGLE_ADDON_ROOT}" STREQUAL "")
message(FATAL_ERROR "Enviroment variable EAGLE_ADDON_ROOT must be set")
else()
set(EAGLE_ADDON_ROOT $ENV{EAGLE_ADDON_ROOT})
endif()
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
message(FATAL_ERROR "Enviroment variable HEXAGON_SDK_ROOT must be set")
else()
@@ -15,11 +21,22 @@ endif()
STRING(REGEX REPLACE "//" "/" EAGLE_DRIVERS_SRC ${EAGLE_DRIVERS_SRC})
STRING(REGEX REPLACE "/" "__" EAGLE_DRIVERS_MODULE_PREFIX ${EAGLE_DRIVERS_SRC})
#include_directories(${EAGLE_ADDON_ROOT}/flight_controller/hexagon/inc)
include_directories(
${HEXAGON_SDK_ROOT}/inc
${HEXAGON_SDK_ROOT}/inc/stddef
${HEXAGON_SDK_ROOT}/lib/common/qurt/ADSPv5MP/include
include_directories(${EAGLE_ADDON_ROOT}/flight_controller/hexagon/inc)
include_directories(${HEXAGON_SDK_ROOT}/lib/common/qurt/ADSPv5MP/include)
message("hexagon_sdk_root is ${HEXAGON_SDK_ROOT}")
set(QURT_ENABLE_STUBS "0")
set(CONFIG_SHMEM "1")
# For Actual flight we need to link against the driver dynamic libraries
set(target_libraries
-L${EAGLE_ADDON_ROOT}/flight_controller/hexagon/libs
mpu9x50
uart_esc
csr_gps
rc_receiver
)
message("hexagon_sdk_root is ${HEXAGON_SDK_ROOT}")
+5 -4
View File
@@ -87,7 +87,7 @@ function(px4_posix_generate_builtin_commands)
set(MAIN_DEFAULT MAIN-NOTFOUND)
set(STACK_DEFAULT 1024)
set(PRIORITY_DEFAULT SCHED_PRIORITY_DEFAULT)
foreach(property MAIN STACK PRIORITY)
foreach(property MAIN STACK PRIORITY)
get_target_property(${property} ${module} ${property})
if(NOT ${property})
set(${property} ${${property}_DEFAULT})
@@ -182,10 +182,11 @@ if(UNIX AND APPLE)
else()
set(added_definitions
-D__PX4_POSIX
-D__PX4_LINUX
-D__DF_LINUX
-D__PX4_LINUX
-D__DF_LINUX
-DCLOCK_MONOTONIC=1
-Dnoreturn_function=__attribute__\(\(noreturn\)\)
-include ${PX4_INCLUDE_DIR}visibility.h
@@ -204,7 +205,7 @@ if ("${BOARD}" STREQUAL "eagle")
else()
set(HEXAGON_ARM_SYSROOT $ENV{HEXAGON_ARM_SYSROOT})
endif()
# Add the toolchain specific flags
set(added_cflags ${POSIX_CMAKE_C_FLAGS} --sysroot=${HEXAGON_ARM_SYSROOT})
set(added_cxx_flags ${POSIX_CMAKE_CXX_FLAGS} --sysroot=${HEXAGON_ARM_SYSROOT})
@@ -36,13 +36,19 @@ set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
find_program(C_COMPILER arm-linux-gnueabihf-gcc)
find_program(C_COMPILER arm-linux-gnueabihf-gcc
PATHS ${HEXAGON_SDK_ROOT}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/bin
NO_DEFAULT_PATH
)
if(NOT C_COMPILER)
message(FATAL_ERROR "could not find arm-linux-gnueabihf-gcc compiler")
endif()
cmake_force_c_compiler(${C_COMPILER} GNU)
find_program(CXX_COMPILER arm-linux-gnueabihf-g++)
find_program(CXX_COMPILER arm-linux-gnueabihf-g++
PATHS ${HEXAGON_SDK_ROOT}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/bin
NO_DEFAULT_PATH
)
if(NOT CXX_COMPILER)
message(FATAL_ERROR "could not find arm-linux-gnueabihf-g++ compiler")
endif()
@@ -51,7 +57,10 @@ cmake_force_cxx_compiler(${CXX_COMPILER} GNU)
# compiler tools
foreach(tool objcopy nm ld)
string(TOUPPER ${tool} TOOL)
find_program(${TOOL} arm-linux-gnueabihf-${tool})
find_program(${TOOL} arm-linux-gnueabihf-${tool}
PATHS ${HEXAGON_SDK_ROOT}/gcc-linaro-arm-linux-gnueabihf-4.8-2013.08_linux/bin
NO_DEFAULT_PATH
)
if(NOT ${TOOL})
message(FATAL_ERROR "could not find arm-linux-gnueabihf-${tool}")
endif()
@@ -66,13 +75,17 @@ foreach(tool echo patch grep rm mkdir nm genromfs cp touch make unzip)
endif()
endforeach()
<<<<<<< ce0aecb062077c0c99423a12eea9ccb36adbd065
set(C_FLAGS "--sysroot=${HEXAGON_ARM_SYSROOT}")
=======
set(C_FLAGS "--sysroot=${HEXAGON_SDK_ROOT}/sysroot")
>>>>>>> Rebase changes on upstream master
set(LINKER_FLAGS "-Wl,-gc-sections")
set(CMAKE_EXE_LINKER_FLAGS ${LINKER_FLAGS})
set(CMAKE_C_FLAGS ${C_FLAGS})
set(CMAKE_CXX_LINKER_FLAGS ${C_FLAGS})
# where is the target environment
# where is the target environment
set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH))
# search for programs in the build host directories