mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
boards: rename AirPi2 to PilotPi, add arm64 support, add to CI
* rename all * add arm64 support * change internal ist8310 onto I2C-1
This commit is contained in:
@@ -10,17 +10,24 @@ pipeline {
|
|||||||
def build_nodes = [:]
|
def build_nodes = [:]
|
||||||
def docker_images = [
|
def docker_images = [
|
||||||
armhf: "px4io/px4-dev-armhf:2020-04-01",
|
armhf: "px4io/px4-dev-armhf:2020-04-01",
|
||||||
|
arm64: "px4io/px4-dev-aarch64:latest",
|
||||||
base: "px4io/px4-dev-base-bionic:2020-04-01",
|
base: "px4io/px4-dev-base-bionic:2020-04-01",
|
||||||
nuttx: "px4io/px4-dev-nuttx-focal:2020-09-14",
|
nuttx: "px4io/px4-dev-nuttx-focal:2020-09-14",
|
||||||
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
snapdragon: "lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||||
]
|
]
|
||||||
|
|
||||||
def armhf_builds = [
|
def armhf_builds = [
|
||||||
target: ["aerotenna_ocpoc_default", "beaglebone_blue_default", "emlid_navio2_default", "px4_raspberrypi_default", "scumaker_airpi2_default"],
|
target: ["aerotenna_ocpoc_default", "beaglebone_blue_default", "emlid_navio2_default", "px4_raspberrypi_default", "scumaker_pilotpi_default"],
|
||||||
image: docker_images.armhf,
|
image: docker_images.armhf,
|
||||||
archive: false
|
archive: false
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def arm64_builds = [
|
||||||
|
target: ["scumaker_pilotpi_arm64"],
|
||||||
|
image: docker_images.arm64,
|
||||||
|
archive: false
|
||||||
|
]
|
||||||
|
|
||||||
def base_builds = [
|
def base_builds = [
|
||||||
target: ["px4_sitl_rtps"],
|
target: ["px4_sitl_rtps"],
|
||||||
image: docker_images.base,
|
image: docker_images.base,
|
||||||
|
|||||||
1
.github/workflows/compile_linux.yml
vendored
1
.github/workflows/compile_linux.yml
vendored
@@ -19,6 +19,7 @@ jobs:
|
|||||||
beaglebone_blue_default,
|
beaglebone_blue_default,
|
||||||
emlid_navio2_default,
|
emlid_navio2_default,
|
||||||
px4_raspberrypi_default,
|
px4_raspberrypi_default,
|
||||||
|
scumaker_pilotpi_default,
|
||||||
]
|
]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|||||||
50
.github/workflows/compile_linux_arm64.yml
vendored
Normal file
50
.github/workflows/compile_linux_arm64.yml
vendored
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
name: Linux ARM64 Targets
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: px4io/px4-dev-aarch64:latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
config: [
|
||||||
|
scumaker_pilotpi_arm64,
|
||||||
|
]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
token: ${{secrets.ACCESS_TOKEN}}
|
||||||
|
|
||||||
|
- name: Prepare ccache timestamp
|
||||||
|
id: ccache_cache_timestamp
|
||||||
|
shell: cmake -P {0}
|
||||||
|
run: |
|
||||||
|
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC)
|
||||||
|
message("::set-output name=timestamp::${current_date}")
|
||||||
|
- name: ccache cache files
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.ccache
|
||||||
|
key: ${{matrix.config}}-ccache-${{steps.ccache_cache_timestamp.outputs.timestamp}}
|
||||||
|
restore-keys: ${{matrix.config}}-ccache-
|
||||||
|
- name: setup ccache
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ccache
|
||||||
|
echo "base_dir = ${GITHUB_WORKSPACE}" > ~/.ccache/ccache.conf
|
||||||
|
echo "compression = true" >> ~/.ccache/ccache.conf
|
||||||
|
echo "compression_level = 6" >> ~/.ccache/ccache.conf
|
||||||
|
echo "max_size = 400M" >> ~/.ccache/ccache.conf
|
||||||
|
ccache -s
|
||||||
|
ccache -z
|
||||||
|
|
||||||
|
- name: make ${{matrix.config}}
|
||||||
|
run: make ${{matrix.config}}
|
||||||
|
- name: ccache post-run
|
||||||
|
run: ccache -s
|
||||||
@@ -5,9 +5,12 @@ if [ -z ${PX4_DOCKER_REPO+x} ]; then
|
|||||||
if [[ $@ =~ .*px4_fmu.* ]]; then
|
if [[ $@ =~ .*px4_fmu.* ]]; then
|
||||||
# nuttx-px4fmu-v{1,2,3,4,5}
|
# nuttx-px4fmu-v{1,2,3,4,5}
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2020-09-14"
|
PX4_DOCKER_REPO="px4io/px4-dev-nuttx-focal:2020-09-14"
|
||||||
elif [[ $@ =~ .*ocpoc.* ]] || [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*airpi2.* ]]; then
|
elif [[ $@ =~ .*ocpoc.* ]] || [[ $@ =~ .*navio2.* ]] || [[ $@ =~ .*raspberry.* ]] || [[ $@ =~ .*beaglebone.* ]] || [[ $@ =~ .*pilotpi.default ]]; then
|
||||||
# aerotenna_ocpoc_default, beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_airpi2_default
|
# aerotenna_ocpoc_default, beaglebone_blue_default, emlid_navio2_default, px4_raspberrypi_default, scumaker_pilotpi_default
|
||||||
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2020-04-01"
|
PX4_DOCKER_REPO="px4io/px4-dev-armhf:2020-04-01"
|
||||||
|
elif [[ $@ =~ .*pilotpi.arm64 ]]; then
|
||||||
|
# scumaker_pilotpi_arm64
|
||||||
|
PX4_DOCKER_REPO="px4io/px4-dev-aarch64:latest"
|
||||||
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
|
elif [[ $@ =~ .*eagle.* ]] || [[ $@ =~ .*excelsior.* ]]; then
|
||||||
# eagle, excelsior
|
# eagle, excelsior
|
||||||
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
PX4_DOCKER_REPO="lorenzmeier/px4-dev-snapdragon:2020-04-01"
|
||||||
|
|||||||
93
boards/scumaker/pilotpi/arm64.cmake
Normal file
93
boards/scumaker/pilotpi/arm64.cmake
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
add_definitions(
|
||||||
|
-D__PX4_LINUX
|
||||||
|
)
|
||||||
|
|
||||||
|
px4_add_board(
|
||||||
|
VENDOR scumaker
|
||||||
|
MODEL pilotpi
|
||||||
|
LABEL arm64
|
||||||
|
PLATFORM posix
|
||||||
|
ARCHITECTURE cortex-a53
|
||||||
|
ROMFSROOT px4fmu_common
|
||||||
|
TOOLCHAIN aarch64-linux-gnu
|
||||||
|
TESTING
|
||||||
|
DRIVERS
|
||||||
|
adc/ads1115
|
||||||
|
#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/invensense/icm42688p
|
||||||
|
imu/invensense/icm42605
|
||||||
|
#magnetometer # all available magnetometer drivers
|
||||||
|
magnetometer/hmc5883
|
||||||
|
magnetometer/isentek/ist8310
|
||||||
|
pca9685_pwm_out
|
||||||
|
pwm_out_sim
|
||||||
|
rc_input
|
||||||
|
#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_hover_thrust_estimator
|
||||||
|
mc_pos_control
|
||||||
|
mc_rate_control
|
||||||
|
#micrortps_bridge
|
||||||
|
navigator
|
||||||
|
rc_update
|
||||||
|
rover_pos_control
|
||||||
|
sensors
|
||||||
|
temperature_compensation
|
||||||
|
sih
|
||||||
|
#simulator
|
||||||
|
vmount
|
||||||
|
vtol_att_control
|
||||||
|
SYSTEMCMDS
|
||||||
|
dyn
|
||||||
|
esc_calib
|
||||||
|
led_control
|
||||||
|
mixer
|
||||||
|
motor_ramp
|
||||||
|
param
|
||||||
|
perf
|
||||||
|
pwm
|
||||||
|
sd_bench
|
||||||
|
shutdown
|
||||||
|
tests # tests and test runner
|
||||||
|
#top
|
||||||
|
topic_listener
|
||||||
|
tune_control
|
||||||
|
ver
|
||||||
|
work_queue
|
||||||
|
EXAMPLES
|
||||||
|
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
|
||||||
|
uuv_example_app
|
||||||
|
work_item
|
||||||
|
)
|
||||||
@@ -37,10 +37,16 @@ else()
|
|||||||
set(AUTOPILOT_HOST "raspberrypi")
|
set(AUTOPILOT_HOST "raspberrypi")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(DEFINED ENV{AUTOPILOT_USER})
|
||||||
|
set(AUTOPILOT_USER $ENV{AUTOPILOT_USER})
|
||||||
|
else()
|
||||||
|
set(AUTOPILOT_USER "pi")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_custom_target(upload
|
add_custom_target(upload
|
||||||
COMMAND rsync -arh --progress
|
COMMAND rsync -arh --progress
|
||||||
${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/rpi/airpi2*.config ${PX4_BINARY_DIR}/etc # source
|
${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${PX4_SOURCE_DIR}/posix-configs/rpi/pilotpi*.config ${PX4_BINARY_DIR}/etc # source
|
||||||
pi@\$\{AUTOPILOT_HOST\}:/home/pi/px4 # destination
|
\$\{AUTOPILOT_USER\}@\$\{AUTOPILOT_HOST\}:/home/\$\{AUTOPILOT_USER\}/px4 # destination
|
||||||
DEPENDS px4
|
DEPENDS px4
|
||||||
COMMENT "uploading px4"
|
COMMENT "uploading px4"
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
@@ -4,7 +4,7 @@ add_definitions(
|
|||||||
|
|
||||||
px4_add_board(
|
px4_add_board(
|
||||||
VENDOR scumaker
|
VENDOR scumaker
|
||||||
MODEL airpi2
|
MODEL pilotpi
|
||||||
LABEL default
|
LABEL default
|
||||||
PLATFORM posix
|
PLATFORM posix
|
||||||
ARCHITECTURE cortex-a53
|
ARCHITECTURE cortex-a53
|
||||||
42
platforms/posix/cmake/Toolchain-aarch64-linux-gnu.cmake
Normal file
42
platforms/posix/cmake/Toolchain-aarch64-linux-gnu.cmake
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# arm-linux-gnueabihf-gcc toolchain
|
||||||
|
|
||||||
|
set(CMAKE_SYSTEM_NAME Linux)
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR arm)
|
||||||
|
set(CMAKE_SYSTEM_VERSION 1)
|
||||||
|
|
||||||
|
set(triple aarch64-linux-gnu)
|
||||||
|
set(CMAKE_LIBRARY_ARCHITECTURE ${triple})
|
||||||
|
set(TOOLCHAIN_PREFIX ${triple})
|
||||||
|
|
||||||
|
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||||
|
set(CMAKE_C_COMPILER_TARGET ${triple})
|
||||||
|
|
||||||
|
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
|
||||||
|
set(CMAKE_CXX_COMPILER_TARGET ${triple})
|
||||||
|
|
||||||
|
set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
|
||||||
|
|
||||||
|
# compiler tools
|
||||||
|
find_program(CMAKE_AR ${TOOLCHAIN_PREFIX}-gcc-ar)
|
||||||
|
find_program(CMAKE_GDB ${TOOLCHAIN_PREFIX}-gdb)
|
||||||
|
find_program(CMAKE_LD ${TOOLCHAIN_PREFIX}-ld)
|
||||||
|
find_program(CMAKE_LINKER ${TOOLCHAIN_PREFIX}-ld)
|
||||||
|
find_program(CMAKE_NM ${TOOLCHAIN_PREFIX}-gcc-nm)
|
||||||
|
find_program(CMAKE_OBJCOPY ${TOOLCHAIN_PREFIX}-objcopy)
|
||||||
|
find_program(CMAKE_OBJDUMP ${TOOLCHAIN_PREFIX}-objdump)
|
||||||
|
find_program(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}-gcc-ranlib)
|
||||||
|
find_program(CMAKE_STRIP ${TOOLCHAIN_PREFIX}-strip)
|
||||||
|
|
||||||
|
set(CMAKE_FIND_ROOT_PATH get_file_component(${CMAKE_C_COMPILER} PATH))
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||||
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||||
|
|
||||||
|
# os tools
|
||||||
|
foreach(tool grep make)
|
||||||
|
string(TOUPPER ${tool} TOOL)
|
||||||
|
find_program(${TOOL} ${tool})
|
||||||
|
if(NOT ${TOOL})
|
||||||
|
message(FATAL_ERROR "could not find ${tool}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
@@ -26,7 +26,7 @@ then
|
|||||||
# some boards has ICM42605 inside
|
# some boards has ICM42605 inside
|
||||||
icm42605 start -s -R 4
|
icm42605 start -s -R 4
|
||||||
fi
|
fi
|
||||||
ist8310 start -X -a 15 -R 4
|
ist8310 start -I -a 15 -R 4
|
||||||
ms5611 start -I
|
ms5611 start -I
|
||||||
|
|
||||||
# ADC
|
# ADC
|
||||||
Reference in New Issue
Block a user