enable px4 flight for excelsior(legacy)

This commit is contained in:
wangxdflight
2017-01-12 12:29:41 -08:00
committed by Lorenz Meier
parent 12767c8538
commit b693e29d64
24 changed files with 399 additions and 222 deletions

View File

@@ -1,78 +1,15 @@
include(posix/px4_impl_posix)
# Eagle is the code name of a board currently in development.
#
# This cmake config builds for POSIX, so the part of the flight stack running
# on the Linux side of the Snapdragon.
include(configs/posix_sdflight_legacy)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-linux-gnueabihf.cmake)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
# Get $QC_SOC_TARGET from environment if existing.
if (DEFINED ENV{QC_SOC_TARGET})
set(QC_SOC_TARGET $ENV{QC_SOC_TARGET})
else()
set(QC_SOC_TARGET "APQ8074")
endif()
set(CONFIG_SHMEM "1")
# This definition allows to differentiate if this just the usual POSIX build
# or if it is for the Snapdragon.
add_definitions(
-D__PX4_POSIX_EAGLE
-D__PX4_POSIX_EAGLE
-D__USING_SNAPDRAGON_LEGACY_DRIVER
)
set(config_module_list
drivers/device
drivers/blinkm
drivers/pwm_out_sim
drivers/rgbled
drivers/led
drivers/boards/sitl
drivers/qshell/posix
systemcmds/param
systemcmds/mixer
systemcmds/ver
systemcmds/topic_listener
modules/mavlink
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
modules/mc_pos_control
modules/mc_att_control
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/muorb/krait
modules/sensors
modules/dataman
modules/sdlog2
modules/logger
modules/simulator
modules/commander
modules/navigator
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/geo
lib/geo_lookup
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/version
lib/DriverFramework/framework
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)
)

View File

@@ -3,8 +3,9 @@
# This cmake config builds for POSIX, so the part of the flight stack running
# on the Linux side of the Snapdragon.
include(configs/posix_sdflight_default)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-oemllib32-linux-gnueabi.cmake)
# This definition allows to differentiate the specific board.
add_definitions(
-D__PX4_POSIX_EXCELSIOR
)
)

View File

@@ -0,0 +1,14 @@
# Excelsior is the code name of a board currently in development.
#
# This cmake config builds for POSIX, so the part of the flight stack running
# on the Linux side of the Snapdragon.
include(configs/posix_sdflight_legacy)
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-arm-oemllib32-linux-gnueabi.cmake)
# This definition allows to differentiate if this just the usual POSIX build
# or if it is for the Snapdragon.
add_definitions(
-D__PX4_POSIX_EXCELSIOR
-D__USING_SNAPDRAGON_LEGACY_DRIVER
)

View File

@@ -0,0 +1,70 @@
include(posix/px4_impl_posix)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
set(config_generate_parameters_scope ALL)
# Get $QC_SOC_TARGET from environment if existing.
if (DEFINED ENV{QC_SOC_TARGET})
set(QC_SOC_TARGET $ENV{QC_SOC_TARGET})
else()
set(QC_SOC_TARGET "APQ8074")
endif()
set(CONFIG_SHMEM "1")
set(config_module_list
drivers/device
drivers/blinkm
drivers/pwm_out_sim
drivers/rgbled
drivers/led
drivers/boards/sitl
drivers/qshell/posix
systemcmds/param
systemcmds/mixer
systemcmds/ver
systemcmds/topic_listener
modules/mavlink
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
modules/mc_pos_control
modules/mc_att_control
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/muorb/krait
modules/sensors
modules/dataman
modules/sdlog2
modules/logger
modules/simulator
modules/commander
modules/navigator
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/conversion
lib/ecl
lib/geo
lib/geo_lookup
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/version
lib/DriverFramework/framework
platforms/common
platforms/posix/px4_layer
platforms/posix/work_queue
)

View File

@@ -1,114 +1,12 @@
include(qurt/px4_impl_qurt)
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
message(FATAL_ERROR "Enviroment variable HEXAGON_SDK_ROOT must be set")
else()
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
set(CONFIG_SHMEM "1")
set(config_generate_parameters_scope ALL)
# Get $QC_SOC_TARGET from environment if existing.
if (DEFINED ENV{QC_SOC_TARGET})
set(QC_SOC_TARGET $ENV{QC_SOC_TARGET})
else()
set(QC_SOC_TARGET "APQ8074")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
include(toolchain/Toolchain-qurt)
include(qurt_flags)
include_directories(${HEXAGON_SDK_INCLUDES})
# Eagle is the code name of a board currently in development.
#
# This cmake config builds for QURT which is the operating system running on
# the DSP side.
# The config between different QURT builds is shared.
include(configs/qurt_sdflight_legacy)
add_definitions(
-D__USING_SNAPDRAGON_LEGACY_DRIVER
-D__PX4_QURT
-D__PX4_QURT_EAGLE
)
set(config_module_list
#
# Board support modules
#
drivers/device
modules/sensors
platforms/posix/drivers/df_mpu9250_wrapper
platforms/posix/drivers/df_bmp280_wrapper
#
# System commands
#
systemcmds/param
#
# Estimation modules
#
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
# Vehicle Control
#
modules/mc_att_control
modules/mc_pos_control
#
# Library modules
#
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/commander
modules/land_detector
#
# PX4 drivers
#
drivers/gps
drivers/pwm_out_rc_in
drivers/qshell/qurt
#
# FC_ADDON drivers
#
platforms/qurt/fc_addon/rc_receiver
platforms/qurt/fc_addon/uart_esc
#
# Libraries
#
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/geo
lib/ecl
lib/geo_lookup
lib/conversion
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/version
lib/DriverFramework/framework
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
#
# sources for muorb over fastrpc
#
modules/muorb/adsp
)
set(config_df_driver_list
mpu9250
bmp280
)

View File

@@ -0,0 +1,14 @@
# Excelsior is the code name of a board currently in development.
#
# This cmake config builds for QURT which is the operating system running on
# the DSP side.
# The config between different QURT builds is shared.
include(configs/qurt_sdflight_legacy)
add_definitions(
-D__USING_SNAPDRAGON_LEGACY_DRIVER
-D__PX4_QURT
-D__PX4_QURT_EXCELSIOR
)

View File

@@ -0,0 +1,108 @@
include(qurt/px4_impl_qurt)
if ("$ENV{HEXAGON_SDK_ROOT}" STREQUAL "")
message(FATAL_ERROR "Enviroment variable HEXAGON_SDK_ROOT must be set")
else()
set(HEXAGON_SDK_ROOT $ENV{HEXAGON_SDK_ROOT})
endif()
set(CONFIG_SHMEM "1")
set(config_generate_parameters_scope ALL)
# Get $QC_SOC_TARGET from environment if existing.
if (DEFINED ENV{QC_SOC_TARGET})
set(QC_SOC_TARGET $ENV{QC_SOC_TARGET})
else()
set(QC_SOC_TARGET "APQ8074")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PX4_SOURCE_DIR}/cmake/cmake_hexagon")
include(toolchain/Toolchain-qurt)
include(qurt_flags)
include_directories(${HEXAGON_SDK_INCLUDES})
set(config_module_list
#
# Board support modules
#
drivers/device
modules/sensors
platforms/posix/drivers/df_mpu9250_wrapper
platforms/posix/drivers/df_bmp280_wrapper
#
# System commands
#
systemcmds/param
#
# Estimation modules
#
modules/attitude_estimator_q
modules/position_estimator_inav
modules/local_position_estimator
modules/ekf2
#
# Vehicle Control
#
modules/mc_att_control
modules/mc_pos_control
#
# Library modules
#
modules/param
modules/systemlib
modules/systemlib/mixer
modules/uORB
modules/commander
modules/land_detector
#
# PX4 drivers
#
drivers/gps
drivers/pwm_out_rc_in
drivers/qshell/qurt
#
# FC_ADDON drivers
#
platforms/qurt/fc_addon/rc_receiver
platforms/qurt/fc_addon/uart_esc
#
# Libraries
#
lib/controllib
lib/mathlib
lib/mathlib/math/filter
lib/geo
lib/ecl
lib/geo_lookup
lib/conversion
lib/terrain_estimation
lib/runway_takeoff
lib/tailsitter_recovery
lib/version
lib/DriverFramework/framework
#
# QuRT port
#
platforms/common
platforms/qurt/px4_layer
platforms/posix/work_queue
#
# sources for muorb over fastrpc
#
modules/muorb/adsp
)
set(config_df_driver_list
mpu9250
bmp280
)

View File

@@ -222,7 +222,7 @@ endif()
set(added_exe_linker_flags)
# This block sets added_c_flags (appends to others).
if ("${BOARD}" STREQUAL "eagle" OR "${BOARD}" STREQUAL "excelsior")
if ("${BOARD}" STREQUAL "eagle")
if ("$ENV{HEXAGON_ARM_SYSROOT}" STREQUAL "")
message(FATAL_ERROR "HEXAGON_ARM_SYSROOT not set")
@@ -239,9 +239,35 @@ if ("${BOARD}" STREQUAL "eagle" OR "${BOARD}" STREQUAL "excelsior")
)
list(APPEND added_exe_linker_flags
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/usr/lib/arm-linux-gnueabihf
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/lib/arm-linux-gnueabihf
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/usr/lib
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/lib
--sysroot=${HEXAGON_ARM_SYSROOT}
)
# This block sets added_c_flags (appends to others).
elseif ("${BOARD}" STREQUAL "excelsior")
if ("$ENV{HEXAGON_ARM_SYSROOT}" STREQUAL "")
message(FATAL_ERROR "HEXAGON_ARM_SYSROOT not set")
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}/lib32-apq8096 -mfloat-abi=softfp -mfpu=neon -mthumb-interwork)
list(APPEND added_cxx_flags
${POSIX_CMAKE_CXX_FLAGS}
--sysroot=${HEXAGON_ARM_SYSROOT}/lib32-apq8096 -mfloat-abi=softfp -mfpu=neon -mthumb-interwork
)
list(APPEND added_exe_linker_flags
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/lib32-apq8096/usr/lib
-Wl,-rpath-link,${HEXAGON_ARM_SYSROOT}/lib32-apq8096/lib
--sysroot=${HEXAGON_ARM_SYSROOT}/lib32-apq8096 -mfloat-abi=softfp -mfpu=neon -mthumb-interwork
)
elseif ("${BOARD}" STREQUAL "rpi" AND "$ENV{RPI_USE_CLANG}" STREQUAL "1")