diff --git a/.ci/Jenkinsfile-compile b/.ci/Jenkinsfile-compile index ce91c28518..364a69808d 100644 --- a/.ci/Jenkinsfile-compile +++ b/.ci/Jenkinsfile-compile @@ -16,7 +16,7 @@ pipeline { ] def armhf_builds = [ - target: ["aerotenna_ocpoc_default", "beaglebone_blue_cross", "emlid_navio2_cross", "parrot_bebop_default", "px4_raspberrypi_cross"], + target: ["aerotenna_ocpoc_default", "beaglebone_blue_default", "emlid_navio2_default", "parrot_bebop_default", "px4_raspberrypi_default"], image: docker_images.armhf, archive: false ] diff --git a/.ci/Jenkinsfile-hardware_linux b/.ci/Jenkinsfile-hardware_linux index 1dd5236eaa..49869916de 100644 --- a/.ci/Jenkinsfile-hardware_linux +++ b/.ci/Jenkinsfile-hardware_linux @@ -13,10 +13,10 @@ pipeline { sh 'make distclean' sh 'ccache -s' sh 'git fetch --tags' - sh 'CCACHE_BASEDIR=${WORKSPACE} make emlid_navio2_native' + sh 'CCACHE_BASEDIR=${WORKSPACE} make emlid_navio2_default' sh 'ccache -s' // sanity check - sh 'cd build/emlid_navio2_native/ && ./bin/px4 -s ../../posix-configs/rpi/px4_test.config' + sh 'cd build/emlid_navio2_default/ && ./bin/px4 -s ../../posix-configs/rpi/px4_test.config' } post { always { diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f00ed873b..c8ce5e25fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -298,8 +298,8 @@ px4_os_add_flags() #============================================================================= # board cmake init (optional) # -if(EXISTS ${PX4_BOARD_DIR}/init.cmake) - include(${PX4_BOARD_DIR}/init.cmake) +if(EXISTS ${PX4_BOARD_DIR}/cmake/init.cmake) + include(${PX4_BOARD_DIR}/cmake/init.cmake) endif() #============================================================================= diff --git a/Tools/docker_run.sh b/Tools/docker_run.sh index 1283499212..876fd1c142 100755 --- a/Tools/docker_run.sh +++ b/Tools/docker_run.sh @@ -6,7 +6,7 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then # nuttx-px4fmu-v{1,2,3,4,5} PX4_DOCKER_REPO="px4io/px4-dev-nuttx:2019-10-24" elif [[ $@ =~ .*ocpoc.* ]] || [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*bebop.* ]]; then - # aerotenna_ocpoc_default, posix_rpi_cross, posix_bebop_default + # aerotenna_ocpoc_default, beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, parrot_bebop_default PX4_DOCKER_REPO="px4io/px4-dev-armhf:2019-10-24" elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then # eagle, excelsior diff --git a/boards/atlflight/eagle/CMakeLists.txt b/boards/atlflight/eagle/CMakeLists.txt index eaa46f8baf..2055ef2eae 100644 --- a/boards/atlflight/eagle/CMakeLists.txt +++ b/boards/atlflight/eagle/CMakeLists.txt @@ -30,44 +30,3 @@ # POSSIBILITY OF SUCH DAMAGE. # ############################################################################ - - - - -############################################################################ -# Upload -############################################################################ - -if("${PX4_PLATFORM}" MATCHES "qurt") - - add_custom_target(upload - COMMAND - ${CMAKE_CURRENT_SOURCE_DIR}/scripts/adb_upload.sh - ${PX4_BINARY_DIR}/platforms/qurt/libpx4.so ${PX4_BINARY_DIR}/platforms/qurt/libpx4muorb_skel.so ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/px4.config # source - /usr/share/data/adsp # destination - DEPENDS px4 px4muorb_skel - COMMENT "uploading px4" - USES_TERMINAL - ) - -else() - - add_custom_target(upload - COMMAND - ${CMAKE_CURRENT_SOURCE_DIR}/scripts/adb_upload.sh - ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bin ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config # source - /home/linaro # destination - DEPENDS px4 - COMMENT "uploading px4" - USES_TERMINAL - ) - - add_custom_target(sanity - COMMAND ./px4_snapflight_sanitytest.sh -i -t - DEPENDS px4 - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts - COMMENT "uploading px4" - USES_TERMINAL - ) - -endif() diff --git a/boards/atlflight/eagle/cmake/upload.cmake b/boards/atlflight/eagle/cmake/upload.cmake new file mode 100644 index 0000000000..f56d3cd3fb --- /dev/null +++ b/boards/atlflight/eagle/cmake/upload.cmake @@ -0,0 +1,64 @@ +############################################################################ +# +# 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("${PX4_PLATFORM}" MATCHES "qurt") + + add_custom_target(upload + COMMAND ${PX4_BOARD_DIR}/scripts/adb_upload.sh + ${PX4_BINARY_DIR}/platforms/qurt/libpx4.so ${PX4_BINARY_DIR}/platforms/qurt/libpx4muorb_skel.so ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/px4.config # source + /usr/share/data/adsp # destination + DEPENDS px4 px4muorb_skel ${PX4_BOARD_DIR}/scripts/adb_upload.sh + COMMENT "uploading px4" + USES_TERMINAL + ) + +else() + + add_custom_target(upload + COMMAND ${PX4_BOARD_DIR}/scripts/adb_upload.sh + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/eagle/flight/mainapp.config ${PX4_SOURCE_DIR}/ROMFS # source + /home/linaro # destination + DEPENDS px4 ${PX4_BOARD_DIR}/scripts/adb_upload.sh + COMMENT "uploading px4" + USES_TERMINAL + ) + + add_custom_target(sanity + COMMAND ./px4_snapflight_sanitytest.sh -i -t + DEPENDS px4 + WORKING_DIRECTORY ${PX4_BOARD_DIR}/scripts + COMMENT "uploading px4" + USES_TERMINAL + ) + +endif() diff --git a/boards/beaglebone/blue/CMakeLists.txt b/boards/beaglebone/blue/CMakeLists.txt index af45ca77f5..9345f95845 100644 --- a/boards/beaglebone/blue/CMakeLists.txt +++ b/boards/beaglebone/blue/CMakeLists.txt @@ -32,14 +32,3 @@ ############################################################################ add_subdirectory(bbblue_adc) - -############################################################################ -# Upload -############################################################################ - -add_custom_target(upload - COMMAND rsync -arh --progress ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/bbblue/*.config ${PX4_SOURCE_DIR}/ROMFS debian@BBBluePX4:/home/debian/px4 - DEPENDS px4 - COMMENT "uploading px4 and data files" - USES_TERMINAL - ) diff --git a/boards/beaglebone/blue/init.cmake b/boards/beaglebone/blue/cmake/init.cmake similarity index 100% rename from boards/beaglebone/blue/init.cmake rename to boards/beaglebone/blue/cmake/init.cmake diff --git a/boards/beaglebone/blue/cmake/upload.cmake b/boards/beaglebone/blue/cmake/upload.cmake new file mode 100644 index 0000000000..d7fea26b7d --- /dev/null +++ b/boards/beaglebone/blue/cmake/upload.cmake @@ -0,0 +1,41 @@ +############################################################################ +# +# 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. +# +############################################################################ + +add_custom_target(upload + COMMAND rsync -arh --progress + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/bbblue/*.config ${PX4_SOURCE_DIR}/ROMFS # source + debian@beaglebone.lan:/home/debian/px4 # destination + DEPENDS px4 + COMMENT "uploading px4" + USES_TERMINAL +) diff --git a/boards/beaglebone/blue/cross.cmake b/boards/beaglebone/blue/default.cmake similarity index 97% rename from boards/beaglebone/blue/cross.cmake rename to boards/beaglebone/blue/default.cmake index 29e4c37b4c..f0bfc260a1 100644 --- a/boards/beaglebone/blue/cross.cmake +++ b/boards/beaglebone/blue/default.cmake @@ -2,7 +2,7 @@ px4_add_board( VENDOR beaglebone MODEL blue - LABEL cross + LABEL default PLATFORM posix ARCHITECTURE cortex-a8 TOOLCHAIN arm-linux-gnueabihf @@ -46,6 +46,7 @@ px4_add_board( mc_att_control mc_pos_control mc_rate_control + #micrortps_bridge navigator rc_update rover_pos_control @@ -82,4 +83,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 ) diff --git a/boards/beaglebone/blue/native.cmake b/boards/beaglebone/blue/native.cmake deleted file mode 100644 index f043f4c969..0000000000 --- a/boards/beaglebone/blue/native.cmake +++ /dev/null @@ -1,83 +0,0 @@ - -px4_add_board( - VENDOR beaglebone - MODEL blue - LABEL native - PLATFORM posix - TESTING - DRIVERS - #barometer # all available barometer drivers - barometer/bmp280 - 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 - mpu9250 - 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 - ) diff --git a/boards/emlid/navio2/CMakeLists.txt b/boards/emlid/navio2/CMakeLists.txt index 2245838e0a..b347a5e825 100644 --- a/boards/emlid/navio2/CMakeLists.txt +++ b/boards/emlid/navio2/CMakeLists.txt @@ -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 - ) diff --git a/boards/emlid/navio2/cmake/upload.cmake b/boards/emlid/navio2/cmake/upload.cmake new file mode 100644 index 0000000000..faf5f9df1d --- /dev/null +++ b/boards/emlid/navio2/cmake/upload.cmake @@ -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 +) diff --git a/boards/emlid/navio2/cross.cmake b/boards/emlid/navio2/default.cmake similarity index 97% rename from boards/emlid/navio2/cross.cmake rename to boards/emlid/navio2/default.cmake index 84893898e9..bb444850a6 100644 --- a/boards/emlid/navio2/cross.cmake +++ b/boards/emlid/navio2/default.cmake @@ -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 ) diff --git a/boards/emlid/navio2/native.cmake b/boards/emlid/navio2/native.cmake deleted file mode 100644 index 43ce85f01c..0000000000 --- a/boards/emlid/navio2/native.cmake +++ /dev/null @@ -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 - ) diff --git a/boards/intel/aerofc-v1/CMakeLists.txt b/boards/intel/aerofc-v1/CMakeLists.txt index 342bbda02c..d5a0096ec6 100644 --- a/boards/intel/aerofc-v1/CMakeLists.txt +++ b/boards/intel/aerofc-v1/CMakeLists.txt @@ -32,16 +32,3 @@ ############################################################################ add_subdirectory(aerofc_adc) - - - -############################################################################ -# Upload -############################################################################ - -add_custom_target(upload - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/aero_upload.sh $ - DEPENDS px4 - COMMENT "uploading px4" - USES_TERMINAL -) diff --git a/boards/intel/aerofc-v1/cmake/upload.cmake b/boards/intel/aerofc-v1/cmake/upload.cmake new file mode 100644 index 0000000000..1f8eeba6a9 --- /dev/null +++ b/boards/intel/aerofc-v1/cmake/upload.cmake @@ -0,0 +1,39 @@ +############################################################################ +# +# 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. +# +############################################################################ + +add_custom_target(upload + COMMAND ${PX4_BOARD_DIR}/scripts/aero_upload.sh $ + DEPENDS px4 ${PX4_BOARD_DIR}/scripts/aero_upload.sh + COMMENT "uploading px4" + USES_TERMINAL +) diff --git a/boards/parrot/bebop/CMakeLists.txt b/boards/parrot/bebop/CMakeLists.txt index 12dee52dc2..650c1b615e 100644 --- a/boards/parrot/bebop/CMakeLists.txt +++ b/boards/parrot/bebop/CMakeLists.txt @@ -32,15 +32,3 @@ ############################################################################ add_subdirectory(flow) - - -############################################################################ -# Upload -############################################################################ - -add_custom_target(upload - COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/scripts/adb_upload_to_bebop.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/bin/. /data/ftp/internal_000/px4 - DEPENDS px4 - COMMENT "uploading px4" - USES_TERMINAL - ) diff --git a/boards/parrot/bebop/cmake/upload.cmake b/boards/parrot/bebop/cmake/upload.cmake new file mode 100644 index 0000000000..6804464fb0 --- /dev/null +++ b/boards/parrot/bebop/cmake/upload.cmake @@ -0,0 +1,41 @@ +############################################################################ +# +# 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. +# +############################################################################ + +add_custom_target(upload + COMMAND ${PX4_BOARD_DIR}/scripts/adb_upload_to_bebop.sh + ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} + /data/ftp/internal_000/px4 + DEPENDS px4 ${PX4_BOARD_DIR}/scripts/adb_upload_to_bebop.sh + COMMENT "uploading px4" + USES_TERMINAL +) diff --git a/boards/px4/raspberrypi/cmake/upload.cmake b/boards/px4/raspberrypi/cmake/upload.cmake index 74cea1b4f5..f0ee765a62 100644 --- a/boards/px4/raspberrypi/cmake/upload.cmake +++ b/boards/px4/raspberrypi/cmake/upload.cmake @@ -1,6 +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 "raspberrypi") +endif() + 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/px4 + 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 - ) +) diff --git a/boards/px4/raspberrypi/cross.cmake b/boards/px4/raspberrypi/default.cmake similarity index 96% rename from boards/px4/raspberrypi/cross.cmake rename to boards/px4/raspberrypi/default.cmake index a7fe039486..2fabad960f 100644 --- a/boards/px4/raspberrypi/cross.cmake +++ b/boards/px4/raspberrypi/default.cmake @@ -2,7 +2,7 @@ px4_add_board( VENDOR px4 MODEL raspberrypi - LABEL cross + LABEL default PLATFORM posix ARCHITECTURE cortex-a53 TOOLCHAIN arm-linux-gnueabihf @@ -45,6 +45,7 @@ px4_add_board( mc_att_control mc_pos_control mc_rate_control + #micrortps_bridge navigator rc_update rover_pos_control @@ -81,4 +82,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 ) diff --git a/boards/px4/raspberrypi/native.cmake b/boards/px4/raspberrypi/native.cmake deleted file mode 100644 index ebc3c48bd4..0000000000 --- a/boards/px4/raspberrypi/native.cmake +++ /dev/null @@ -1,82 +0,0 @@ - -px4_add_board( - VENDOR px4 - MODEL raspberrypi - 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 - rpi_rc_in - #telemetry # all available telemetry drivers - 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 - )