mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 11:06:04 +08:00
Add Parrot Bebop as build target (#4698)
* Add parrot bebop build structure * Add upload functionality to bebop build * Add modules and commands to bebop build
This commit is contained in:
committed by
Lorenz Meier
parent
292b35d06d
commit
d9422e0296
@@ -528,6 +528,24 @@ function(px4_add_adb_push)
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(px4_add_adb_push_to_bebop)
|
||||
px4_parse_function_args(
|
||||
NAME px4_add_upload_to_bebop
|
||||
ONE_VALUE OS BOARD OUT DEST
|
||||
MULTI_VALUE FILES DEPENDS
|
||||
REQUIRED OS BOARD OUT FILES DEPENDS DEST
|
||||
ARGN ${ARGN})
|
||||
|
||||
add_custom_target(${OUT}
|
||||
COMMAND ${CMAKE_SOURCE_DIR}/Tools/adb_upload_to_bebop.sh ${FILES} ${DEST}
|
||||
DEPENDS ${DEPENDS}
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
|
||||
COMMENT "uploading ${BUNDLE}"
|
||||
VERBATIM
|
||||
USES_TERMINAL
|
||||
)
|
||||
endfunction()
|
||||
|
||||
function(px4_add_scp_push)
|
||||
px4_parse_function_args(
|
||||
NAME px4_add_upload
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
include(posix/px4_impl_posix)
|
||||
|
||||
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/toolchains/Toolchain-arm-linux-gnueabihf-raspbian.cmake)
|
||||
|
||||
add_definitions(
|
||||
-D__PX4_POSIX_BEBOP
|
||||
)
|
||||
|
||||
set(CMAKE_PROGRAM_PATH
|
||||
"${RPI_TOOLCHAIN_DIR}/gcc-linaro-arm-linux-gnueabihf-raspbian/bin"
|
||||
${CMAKE_PROGRAM_PATH}
|
||||
)
|
||||
|
||||
set(config_module_list
|
||||
|
||||
examples/px4_simple_app
|
||||
|
||||
#
|
||||
# Board support modules
|
||||
#
|
||||
drivers/device
|
||||
modules/sensors
|
||||
|
||||
#
|
||||
# System commands
|
||||
#
|
||||
systemcmds/param
|
||||
systemcmds/mixer
|
||||
systemcmds/ver
|
||||
systemcmds/esc_calib
|
||||
systemcmds/topic_listener
|
||||
systemcmds/perf
|
||||
|
||||
#
|
||||
# Estimation modules (EKF/ SO3 / other filters)
|
||||
#
|
||||
#modules/attitude_estimator_ekf
|
||||
modules/ekf_att_pos_estimator
|
||||
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/load_mon
|
||||
modules/param
|
||||
modules/systemlib
|
||||
modules/systemlib/mixer
|
||||
modules/uORB
|
||||
modules/dataman
|
||||
modules/land_detector
|
||||
modules/navigator
|
||||
modules/mavlink
|
||||
|
||||
#
|
||||
# PX4 drivers
|
||||
#
|
||||
|
||||
#
|
||||
# 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
|
||||
)
|
||||
@@ -166,6 +166,15 @@ function(px4_os_add_flags)
|
||||
mavlink/include/mavlink
|
||||
)
|
||||
|
||||
# Use the pthread instead of lpthread if the firmware is build for the parrot
|
||||
# bebop. This resolves some linker errors in DriverFramework, when building a
|
||||
# static target.
|
||||
if ("${BOARD}" STREQUAL "bebop")
|
||||
set(PX4_PTHREAD_BUILD "-pthread")
|
||||
else()
|
||||
set(PX4_PTHREAD_BUILD "-lpthread")
|
||||
endif()
|
||||
|
||||
if(UNIX AND APPLE)
|
||||
set(added_definitions
|
||||
-D__PX4_POSIX
|
||||
@@ -177,7 +186,7 @@ if(UNIX AND APPLE)
|
||||
)
|
||||
|
||||
set(added_exe_linker_flags
|
||||
-lpthread
|
||||
${PX4_PTHREAD_BUILD}
|
||||
)
|
||||
|
||||
else()
|
||||
@@ -192,7 +201,7 @@ else()
|
||||
)
|
||||
|
||||
set(added_exe_linker_flags
|
||||
-lpthread -lrt
|
||||
${PX4_PTHREAD_BUILD} -lrt
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user