From 18298f861d81e8fba0fbaa5b8eba102d4d7fbdd7 Mon Sep 17 00:00:00 2001 From: crossa <421395590@qq.com> Date: Sat, 29 Apr 2017 20:14:56 +0800 Subject: [PATCH] Remove duplicated configs --- cmake/configs/posix_rpi_cross_single.cmake | 116 ----------------- cmake/configs/posix_rpi_native_single.cmake | 119 ------------------ ...-arm-bcm2835-linx-gnueabihf-raspbian.cmake | 99 --------------- 3 files changed, 334 deletions(-) delete mode 100644 cmake/configs/posix_rpi_cross_single.cmake delete mode 100644 cmake/configs/posix_rpi_native_single.cmake delete mode 100644 cmake/toolchains/Toolchain-arm-bcm2835-linx-gnueabihf-raspbian.cmake diff --git a/cmake/configs/posix_rpi_cross_single.cmake b/cmake/configs/posix_rpi_cross_single.cmake deleted file mode 100644 index 90e943aa05..0000000000 --- a/cmake/configs/posix_rpi_cross_single.cmake +++ /dev/null @@ -1,116 +0,0 @@ -# 使用这个文件可在上位机交叉编译px4firmware -include(posix/px4_impl_posix) - -# This definition allows to differentiate if this just the usual POSIX build -# or if it is for the RPi. -add_definitions( - -D__PX4_POSIX_RPI - -D__DF_LINUX # For DriverFramework - -D__DF_RPI # For raspberry pi - -D__DF_RPI_SINGLE # For raspberry pi alone -) - -# 硬件驱动模块 -set(config_module_list - # - # Board support modules - # - drivers/device - modules/sensors - platforms/posix/drivers/df_mpu9250_wrapper - platforms/posix/drivers/df_ms5611_wrapper - platforms/posix/drivers/df_trone_wrapper - - # - # System commands - # - systemcmds/param - systemcmds/mixer - systemcmds/ver - systemcmds/esc_calib - systemcmds/reboot - systemcmds/topic_listener - systemcmds/perf - - # - # 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 - modules/fw_att_control - modules/fw_pos_control_l1 - modules/vtol_att_control - - # - # Library modules - # - modules/sdlog2 - modules/logger - modules/commander - modules/param - modules/systemlib - modules/systemlib/mixer - modules/uORB - modules/dataman - modules/land_detector - modules/navigator - modules/mavlink - - # - # PX4 drivers - # - drivers/gps - drivers/rpi_rc_in - drivers/rpi_pca9685_pwm_out - - # - # Libraries - # - lib/controllib - lib/mathlib - lib/mathlib/math/filter - lib/geo - lib/ecl - lib/geo_lookup - lib/launchdetection - lib/external_lgpl - lib/conversion - lib/terrain_estimation - lib/runway_takeoff - lib/tailsitter_recovery - lib/DriverFramework/framework - - # - # POSIX - # - platforms/common - platforms/posix/px4_layer - platforms/posix/work_queue -) - -# -# DriverFramework driver -# -set(config_df_driver_list - mpu9250 - ms5611 - trone - #isl29501 -) - -# 设定交叉工具链 -set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-bcm2835-linx-gnueabihf-raspbian.cmake) - - -#set(CMAKE_PROGRAM_PATH -# "${RPI_TOOLCHAIN_DIR}/arm-bcm2835-linux-gnueabihf/bin" -# ${CMAKE_PROGRAM_PATH} -#)*/ diff --git a/cmake/configs/posix_rpi_native_single.cmake b/cmake/configs/posix_rpi_native_single.cmake deleted file mode 100644 index c4cb7921ae..0000000000 --- a/cmake/configs/posix_rpi_native_single.cmake +++ /dev/null @@ -1,119 +0,0 @@ -# This file is shared between posix_rpi_native.cmake -# and posix_rpi_cross.cmake. - -include(posix/px4_impl_posix) - -# This definition allows to differentiate if this just the usual POSIX build -# or if it is for the RPi. -add_definitions( - -D__PX4_POSIX_RPI - -D__DF_LINUX # For DriverFramework - -D__DF_RPI # For raspberry pi -) - - -set(config_module_list - # - # Board support modules - # - drivers/device - modules/sensors - platforms/posix/drivers/df_mpu9250_wrapper - #platforms/posix/drivers/df_lsm9ds1_wrapper - platforms/posix/drivers/df_ms5611_wrapper - #platforms/posix/drivers/df_hmc5883_wrapper - platforms/posix/drivers/df_trone_wrapper - #platforms/posix/drivers/df_isl29501_wrapper - - # - # System commands - # - systemcmds/param - systemcmds/mixer - systemcmds/ver - systemcmds/esc_calib - systemcmds/reboot - systemcmds/topic_listener - systemcmds/perf - - # - # 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 - modules/fw_att_control - modules/fw_pos_control_l1 - modules/vtol_att_control - - # - # Library modules - # - modules/sdlog2 - modules/logger - modules/commander - modules/param - modules/systemlib - modules/systemlib/mixer - modules/uORB - modules/dataman - modules/land_detector - modules/navigator - modules/mavlink - - # - # PX4 drivers - # - drivers/gps - drivers/rpi_rc_in - drivers/rpi_pca9685_pwm_out - #drivers/navio_sysfs_rc_in - #drivers/navio_sysfs_pwm_out - #drivers/navio_gpio - #drivers/navio_rgbled - - # - # Libraries - # - lib/controllib - lib/mathlib - lib/mathlib/math/filter - lib/geo - lib/ecl - lib/geo_lookup - lib/launchdetection - lib/external_lgpl - lib/conversion - lib/terrain_estimation - lib/runway_takeoff - lib/tailsitter_recovery - lib/DriverFramework/framework - - # - # POSIX - # - platforms/common - platforms/posix/px4_layer - platforms/posix/work_queue -) - -# -# DriverFramework driver -# -set(config_df_driver_list - mpu9250 - #lsm9ds1 - ms5611 - #hmc5883 - trone - #isl29501 -) - -set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-native.cmake) diff --git a/cmake/toolchains/Toolchain-arm-bcm2835-linx-gnueabihf-raspbian.cmake b/cmake/toolchains/Toolchain-arm-bcm2835-linx-gnueabihf-raspbian.cmake deleted file mode 100644 index 8d6e7a9dfa..0000000000 --- a/cmake/toolchains/Toolchain-arm-bcm2835-linx-gnueabihf-raspbian.cmake +++ /dev/null @@ -1,99 +0,0 @@ -# defines: -# -# NM -# OBJCOPY -# LD -# CXX_COMPILER -# C_COMPILER -# CMAKE_SYSTEM_NAME -# CMAKE_SYSTEM_VERSION -# LINKER_FLAGS -# CMAKE_EXE_LINKER_FLAGS -# CMAKE_FIND_ROOT_PATH -# CMAKE_FIND_ROOT_PATH_MODE_PROGRAM -# CMAKE_FIND_ROOT_PATH_MODE_LIBRARY -# CMAKE_FIND_ROOT_PATH_MODE_INCLUDE - -include(CMakeForceCompiler) - -if ("$ENV{RPI_TOOLCHAIN_DIR}" STREQUAL "") - message(FATAL_ERROR "RPI_TOOLCHAIN_DIR not set") -else() - set(RPI_TOOLCHAIN_DIR $ENV{RPI_TOOLCHAIN_DIR}) -endif() - -if ("$ENV{CROSS_COMPILE_PREFIX}" STREQUAL "") - message(FATAL_ERROR "CROSS_COMPILE_PREFIX not set") -else() - set(CROSS_COMPILE_PREFIX $ENV{CROSS_COMPILE_PREFIX}) -endif() - - - - - -# this one is important -set(CMAKE_SYSTEM_NAME Generic) - -#this one not so much -set(CMAKE_SYSTEM_VERSION 1) - -# specify the cross compiler -find_program(C_COMPILER ${CROSS_COMPILE_PREFIX}-gcc - PATHS ${RPI_TOOLCHAIN_DIR}/bin - NO_DEFAULT_PATH - ) - -if(NOT C_COMPILER) - message(FATAL_ERROR "could not find ${CROSS_COMPILE_PREFIX}-gcc compiler") -endif() -cmake_force_c_compiler(${C_COMPILER} GNU) - -find_program(CXX_COMPILER ${CROSS_COMPILE_PREFIX}-g++ - PATHS ${RPI_TOOLCHAIN_DIR}/bin - NO_DEFAULT_PATH - ) - -if(NOT CXX_COMPILER) - message(FATAL_ERROR "could not find ${CROSS_COMPILE_PREFIX}-g++ compiler") -endif() -cmake_force_cxx_compiler(${CXX_COMPILER} GNU) - -# compiler tools -foreach(tool objcopy nm ld) - string(TOUPPER ${tool} TOOL) - find_program(${TOOL} ${CROSS_COMPILE_PREFIX}-${tool} - PATHS ${RPI_TOOLCHAIN_DIR}/bin - NO_DEFAULT_PATH - ) - if(NOT ${TOOL}) - message(FATAL_ERROR "could not find ${CROSS_COMPILE_PREFIX}-${tool}") - endif() -endforeach() - -# os tools -foreach(tool echo grep rm mkdir nm cp touch make unzip) - string(TOUPPER ${tool} TOOL) - find_program(${TOOL} ${tool}) - if(NOT ${TOOL}) - message(FATAL_ERROR "could not find ${TOOL}") - endif() -endforeach() - -add_definitions( - -D __DF_RPI - ) - -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 -set(CMAKE_FIND_ROOT_PATH get_file_component(${C_COMPILER} PATH)) - -# search for programs in the build host directories -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -# for libraries and headers in the target directories -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)