From efd20373fffee68f7aa9e02eb04e1ba098881d6f Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Thu, 5 May 2016 09:12:46 +0200 Subject: [PATCH] cmake: re-use the QURT build as well Instead of calling the eagle cmake script from excelsior, use a shared sdflight cmake file like in it is done for the POSIX build on Snapdragon. --- cmake/configs/qurt_eagle_default.cmake | 108 ++------------------- cmake/configs/qurt_excelsior_default.cmake | 10 +- cmake/configs/qurt_sdflight_default.cmake | 100 +++++++++++++++++++ 3 files changed, 118 insertions(+), 100 deletions(-) create mode 100644 cmake/configs/qurt_sdflight_default.cmake diff --git a/cmake/configs/qurt_eagle_default.cmake b/cmake/configs/qurt_eagle_default.cmake index 3ea8ad37b4..31c112d972 100644 --- a/cmake/configs/qurt_eagle_default.cmake +++ b/cmake/configs/qurt_eagle_default.cmake @@ -1,100 +1,12 @@ -include(qurt/px4_impl_qurt) +# The Eagle board is the first generation Snapdragon Flight board by Qualcomm. +# +# This cmake config builds for QURT which is the operating system running on +# the DSP side. -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() +# The config between different QURT builds is shared. +include(configs/qurt_sdflight_default) -set(CONFIG_SHMEM "1") - -set(config_generate_parameters_scope ALL) - -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake) - -set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon") - -set(config_module_list - # - # Board support modules - # - drivers/device - modules/sensors - platforms/posix/drivers/df_mpu9250_wrapper - platforms/posix/drivers/df_bmp280_wrapper - platforms/posix/drivers/df_hmc5883_wrapper - platforms/posix/drivers/df_trone_wrapper - platforms/posix/drivers/df_isl29501_wrapper - - # - # System commands - # - systemcmds/param - - # - # Estimation modules (EKF/ SO3 / other filters) - # - #modules/attitude_estimator_ekf - modules/ekf_att_pos_estimator - modules/attitude_estimator_q - modules/position_estimator_inav - 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/uart_esc - drivers/qshell/qurt - - # - # 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/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 - hmc5883 - trone - isl29501 - ) +# This definition allows to differentiate the specific board. +add_definitions( + -D__PX4_QURT_EAGLE +) diff --git a/cmake/configs/qurt_excelsior_default.cmake b/cmake/configs/qurt_excelsior_default.cmake index ef9b549d49..ccfe80df28 100644 --- a/cmake/configs/qurt_excelsior_default.cmake +++ b/cmake/configs/qurt_excelsior_default.cmake @@ -1,6 +1,12 @@ -include(configs/qurt_eagle_default) +# 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_default) + +# This definition allows to differentiate the specific board. add_definitions( -D__PX4_QURT_EXCELSIOR ) - diff --git a/cmake/configs/qurt_sdflight_default.cmake b/cmake/configs/qurt_sdflight_default.cmake new file mode 100644 index 0000000000..3ea8ad37b4 --- /dev/null +++ b/cmake/configs/qurt_sdflight_default.cmake @@ -0,0 +1,100 @@ +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) + +set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon/toolchain/Toolchain-qurt.cmake) + +set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/cmake_hexagon") + +set(config_module_list + # + # Board support modules + # + drivers/device + modules/sensors + platforms/posix/drivers/df_mpu9250_wrapper + platforms/posix/drivers/df_bmp280_wrapper + platforms/posix/drivers/df_hmc5883_wrapper + platforms/posix/drivers/df_trone_wrapper + platforms/posix/drivers/df_isl29501_wrapper + + # + # System commands + # + systemcmds/param + + # + # Estimation modules (EKF/ SO3 / other filters) + # + #modules/attitude_estimator_ekf + modules/ekf_att_pos_estimator + modules/attitude_estimator_q + modules/position_estimator_inav + 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/uart_esc + drivers/qshell/qurt + + # + # 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/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 + hmc5883 + trone + isl29501 + )