cmake merge linux cross compile targets (cross + native) and cleanup

- consolidate cross and native variants (only a single default is needed)
   - beaglebone_blue_cross + beaglebone_blue_native => beaglebone_blue_default
   - emlid_navio2_cross + emlid_navio2_native => emlid_navio2_default
   - px4_raspberrypi_cross + px4_raspberrypi_native => px4_raspberrypi_default
 - move upload helpers to cmake/upload.cmake
This commit is contained in:
Daniel Agar
2020-01-05 14:03:57 -05:00
committed by GitHub
parent aaf5670e7d
commit 7241eebd80
22 changed files with 290 additions and 352 deletions
-12
View File
@@ -34,15 +34,3 @@
add_subdirectory(navio_adc)
add_subdirectory(navio_rgbled)
add_subdirectory(navio_sysfs_rc_in)
############################################################################
# Upload
############################################################################
add_custom_target(upload
COMMAND rsync -arh --progress ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/rpi/*.config ${PX4_SOURCE_DIR}/ROMFS pi@"$ENV{AUTOPILOT_HOST}":/home/pi
DEPENDS px4
COMMENT "uploading px4"
USES_TERMINAL
)
+47
View File
@@ -0,0 +1,47 @@
############################################################################
#
# Copyright (c) 2020 PX4 Development Team. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name PX4 nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
if($ENV{AUTOPILOT_HOST})
set(AUTOPILOT_HOST $ENV{AUTOPILOT_HOST})
else()
set(AUTOPILOT_HOST "navio")
endif()
add_custom_target(upload
COMMAND rsync -arh --progress
${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/rpi/*.config ${PX4_SOURCE_DIR}/ROMFS # source
pi@${AUTOPILOT_HOST}:/home/pi/px4 # destination
DEPENDS px4
COMMENT "uploading px4"
USES_TERMINAL
)
@@ -2,7 +2,7 @@
px4_add_board(
VENDOR emlid
MODEL navio2
LABEL cross
LABEL default
PLATFORM posix
ARCHITECTURE cortex-a53
TOOLCHAIN arm-linux-gnueabihf
@@ -50,6 +50,7 @@ px4_add_board(
mc_att_control
mc_pos_control
mc_rate_control
#micrortps_bridge
navigator
rc_update
rover_pos_control
@@ -86,4 +87,5 @@ px4_add_board(
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
uuv_example_app
)
-87
View File
@@ -1,87 +0,0 @@
px4_add_board(
VENDOR emlid
MODEL navio2
LABEL native
PLATFORM posix
TESTING
DRIVERS
#barometer # all available barometer drivers
barometer/ms5611
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
gps
#imu # all available imu drivers
imu/mpu9250
linux_pwm_out
linux_sbus
#magnetometer # all available magnetometer drivers
magnetometer/hmc5883
pwm_out_sim
#telemetry # all available telemetry drivers
DF_DRIVERS # NOTE: DriverFramework is migrating to intree PX4 drivers
hmc5883
isl29501
lsm9ds1
mpu9250
trone
MODULES
airspeed_selector
attitude_estimator_q
battery_status
camera_feedback
commander
dataman
ekf2
events
fw_att_control
fw_pos_control_l1
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_pos_control
mc_rate_control
navigator
rc_update
rover_pos_control
sensors
sih
#simulator
vmount
vtol_att_control
SYSTEMCMDS
dyn
esc_calib
led_control
mixer
motor_ramp
param
perf
pwm
reboot
sd_bench
shutdown
tests # tests and test runner
top
topic_listener
tune_control
ver
work_queue
EXAMPLES
bottle_drop # OBC challenge
dyn_hello # dynamically loading modules example
fixedwing_control # Tutorial code from https://px4.io/dev/example_fixedwing_control
hello
#hwtest # Hardware test
#matlab_csv_serial
px4_mavlink_debug # Tutorial code from http://dev.px4.io/en/debug/debug_values.html
px4_simple_app # Tutorial code from http://dev.px4.io/en/apps/hello_sky.html
rover_steering_control # Rover example app
)