Skip to content

Commit

Permalink
WIP: CUAV X7Pro
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Apr 21, 2020
1 parent 809b45e commit fb3942a
Show file tree
Hide file tree
Showing 34 changed files with 3,689 additions and 23 deletions.
1 change: 1 addition & 0 deletions .ci/Jenkinsfile-compile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pipeline {
"airmind_mindpx-v2_default",
"av_x-v1_default",
"bitcraze_crazyflie_default",
"cuav_x7pro_default",
"holybro_durandal-v1_default",
"holybro_durandal-v1_stackcheck",
"holybro_kakutef7",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/compile_nuttx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
airmind_mindpx-v2_default,
av_x-v1_default,
bitcraze_crazyflie_default,
cuav_x7pro_default,
holybro_durandal-v1_default,
holybro_durandal-v1_stackcheck,
holybro_kakutef7_default,
Expand Down
31 changes: 18 additions & 13 deletions .vscode/cmake-variants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CONFIG:
default: px4_sitl_default
choices:
px4_sitl_default:
short: px4_sitl_default
short: px4_sitl
buildType: RelWithDebInfo
settings:
CONFIG: px4_sitl_default
Expand All @@ -17,67 +17,72 @@ CONFIG:
settings:
CONFIG: px4_sitl_test
px4_io-v2_default:
short: px4_io-v2_default
short: px4_io-v2
buildType: MinSizeRel
settings:
CONFIG: px4_io-v2_default
px4_fmu-v2_default:
short: px4_fmu-v2_default
short: px4_fmu-v2
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v2_default
px4_fmu-v3_default:
short: px4_fmu-v3_default
short: px4_fmu-v3
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v3_default
px4_fmu-v4_default:
short: px4_fmu-v4_default
short: px4_fmu-v4
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v4_default
px4_fmu-v4pro_default:
short: px4_fmu-v4pro_default
short: px4_fmu-v4pro
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v4pro_default
px4_fmu-v5_default:
short: px4_fmu-v5_default
short: px4_fmu-v5
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5_default
px4_fmu-v5x_default:
short: px4_fmu-v5x_default
short: px4_fmu-v5x
buildType: MinSizeRel
settings:
CONFIG: px4_fmu-v5x_default
airmind_mindpx-v2_default:
short: airmind_mindpx-v2_default
short: airmind_mindpx-v2
buildType: MinSizeRel
settings:
CONFIG: airmind_mindpx-v2_default
av_x-v1_default:
short: av_x-v1_default
short: av_x-v1
buildType: MinSizeRel
settings:
CONFIG: av_x-v1_default
cuav_x7pro_default:
short: cuav_x7pro
buildType: MinSizeRel
settings:
CONFIG: cuav_x7pro_default
holybro_durandal-v1_default:
short: holybro_durandal-v1
buildType: MinSizeRel
settings:
CONFIG: holybro_durandal-v1_default
intel_aerofc-v1_default:
short: intel_aerofc-v1_default
short: intel_aerofc-v1
buildType: MinSizeRel
settings:
CONFIG: intel_aerofc-v1_default
modalai_fc-v1_default:
short: modalai_fc-v1_default
short: modalai_fc-v1
buildType: MinSizeRel
settings:
CONFIG: modalai_fc-v1_default
mro_ctrl-zero-f7_default:
short: mro_ctrl-zero-f7_default
short: mro_ctrl-zero-f7
buildType: MinSizeRel
settings:
CONFIG: mro_ctrl-zero-f7_default
Expand Down
9 changes: 9 additions & 0 deletions boards/cuav/x7pro/bootloader.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

px4_add_board(
PLATFORM nuttx
VENDOR cuav
MODEL x7pro
LABEL bootloader
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
)
124 changes: 124 additions & 0 deletions boards/cuav/x7pro/default.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@

px4_add_board(
PLATFORM nuttx
VENDOR cuav
MODEL x7pro
LABEL default
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
BUILD_BOOTLOADER
TESTING
# UAVCAN_INTERFACES 2 - No H7 or FD can support in UAVCAN
SERIAL_PORTS
GPS1:/dev/ttyS0
TEL1:/dev/ttyS1
GPS2:/dev/ttyS2
TEL2:/dev/ttyS3
# CONSOLE: /dev/ttyS4
# RC: /dev/ttyS5
DRIVERS
adc
barometer # all available barometer drivers
batt_smbus
camera_capture
camera_trigger
differential_pressure # all available differential pressure drivers
distance_sensor # all available distance sensor drivers
dshot
gps
heater
#imu # all available imu drivers
imu/adis16448
imu/adis16477
imu/adis16497
imu/bmi088
imu/invensense/icm20649
imu/invensense/icm20689
irlock
lights/blinkm
lights/rgbled
lights/rgbled_ncp5623c
magnetometer # all available magnetometer drivers
mkblctrl
optical_flow # all available optical flow drivers
#osd
pca9685
power_monitor/ina226
#protocol_splitter
pwm_out_sim
pwm_out
rc_input
roboclaw
tap_esc
telemetry # all available telemetry drivers
test_ppm
tone_alarm
# uavcan - No H7 or FD can support in UAVCAN yet
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
navigator
rc_update
rover_pos_control
sensors
sih
temperature_compensation
vmount
vtol_att_control
SYSTEMCMDS
bl_update
dmesg
dumpfile
esc_calib
hardfault_log
i2cdetect
led_control
mixer
motor_ramp
motor_test
mtd
nshterm
param
perf
pwm
reboot
reflect
sd_bench
shutdown
tests # tests and test runner
top
topic_listener
tune_control
usb_connected
ver
work_queue
EXAMPLES
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
)
13 changes: 13 additions & 0 deletions boards/cuav/x7pro/firmware.prototype
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"board_id": 1010,
"magic": "PX4FWv1",
"description": "Firmware for the CUAV X7Pro board",
"image": "",
"build_time": 0,
"summary": "X7Pro",
"version": "0.1",
"image_size": 0,
"image_maxsize": 1966080,
"git_identity": "",
"board_revision": 0
}
38 changes: 38 additions & 0 deletions boards/cuav/x7pro/init/rc.board_defaults
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh
#
# CUAV X7Pro specific board defaults
#------------------------------------------------------------------------------

#
# Bootloader upgrade
#
set BL_FILE /etc/extras/cuav_x7pro_bootloader.bin
if [ -f $BL_FILE ]
then
if param compare SYS_BL_UPDATE 1
then
param set SYS_BL_UPDATE 0
param save
echo "BL update..." >> $LOG_FILE
bl_update $BL_FILE
echo "BL update done" >> $LOG_FILE
reboot
fi
fi
unset BL_FILE

if [ $AUTOCNF = yes ]
then
param set BAT_V_DIV 18
param set BAT1_V_DIV 18
param set BAT2_V_DIV 18

param set BAT_A_PER_V 24
param set BAT1_A_PER_V 24
param set BAT2_A_PER_V 24

# Enable IMU thermal control
param set SENS_EN_THERMAL 1
fi

set LOGGER_BUF 64
7 changes: 7 additions & 0 deletions boards/cuav/x7pro/init/rc.board_mavlink
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
#
# Board specific specific board MAVLink startup script.
#------------------------------------------------------------------------------

# Start MAVLink on the USB port
mavlink start -d /dev/ttyACM0
26 changes: 26 additions & 0 deletions boards/cuav/x7pro/init/rc.board_sensors
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
#
# CUAV X7Pro specific board sensors init
#------------------------------------------------------------------------------
adc start

# SPI1 (internal)
#adis16470 -s start
rm3100 -s start
icm20689 -s -R 2 start

# SPI4 (internal)
bmi088 -A -s -R 10 start
bmi088 -G -s -R 10 start
ms5611 -s -b 4 start

# SPI6 (internal)
icm20649 -s -b 6 -R 2 start
ms5611 -s -b 6 start


# Possible external compasses
ist8310 -X start
hmc5883 -T -X start
qmc5883 -X start
lis3mdl -X start
Loading

0 comments on commit fb3942a

Please sign in to comment.