mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-28 19:32:36 +08:00
Add -D__DF_RPI_SINGLE in posix_rpi_common.cmake
Add -D__DF_RPI in posix_rpi_common.cmake Add rpi_rc_in and rpi_pca9685_pwm_out driver in posix_rpi_common.cmake Rename posix_rpi_cross_without_navio_or_pxfmini to posix_rpi_cross_no_shield.cmake
This commit is contained in:
@@ -81,6 +81,8 @@ set(config_module_list
|
||||
drivers/linux_gpio
|
||||
drivers/navio_rgbled
|
||||
drivers/pwm_out_sim
|
||||
drivers/rpi_rc_in
|
||||
drivers/rpi_pca9685_pwm_out
|
||||
|
||||
#
|
||||
# Libraries
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# 使用这个文件可在上位机交叉编译px4firmware
|
||||
# use this file to cross compile px4 for raspberry pi without any shield
|
||||
include(configs/posix_rpi_common)
|
||||
|
||||
if("$ENV{RPI_USE_CLANG}" STREQUAL "1")
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian-clang.cmake)
|
||||
else()
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
endif()
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
@@ -1,114 +0,0 @@
|
||||
# 使用这个文件可在上位机交叉编译px4firmware
|
||||
# use this file to cross compile px4 without navio or pxfmini for raspberry pi
|
||||
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(without pxfmini or navio)
|
||||
)
|
||||
|
||||
# 硬件驱动模块
|
||||
# Setup module and driver
|
||||
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
|
||||
)
|
||||
|
||||
# 设定交叉工具链
|
||||
# Setup toolchain
|
||||
set(CMAKE_TOOLCHAIN_FILE ${PX4_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user