Skip to content

Commit

Permalink
add px4_fmu-v5_critmonitor
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Aug 17, 2019
1 parent acc7067 commit 40b5f94
Show file tree
Hide file tree
Showing 3 changed files with 461 additions and 1 deletion.
79 changes: 78 additions & 1 deletion .ci/Jenkinsfile-hardware
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,30 @@ pipeline {
}
}

stage('px4_fmu-v5_critmonitor') {
agent {
docker {
image 'px4io/px4-dev-nuttx:2019-07-29'
args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
}
}
steps {
sh 'export'
sh 'make distclean'
sh 'ccache -z'
sh 'git fetch --tags'
sh 'make px4_fmu-v5_critmonitor'
sh 'make sizes'
sh 'ccache -s'
stash includes: 'build/px4_fmu-v5_critmonitor/px4_fmu-v5_critmonitor.elf', name: 'px4_fmu-v5_critmonitor'
}
post {
always {
sh 'make distclean'
}
}
}

stage('px4_fmu-v5_irqmonitor') {
agent {
docker {
Expand Down Expand Up @@ -571,6 +595,56 @@ pipeline {
}
}

stage('px4_fmu-v5_critmonitor') {
agent {
label 'px4_fmu-v5'
}
steps {
script {
try {
sh 'export'
sh 'find /dev/serial'
unstash 'px4_fmu-v5_critmonitor'
// flash board and watch bootup
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_critmonitor/px4_fmu-v5_critmonitor.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "free"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /dev"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ls /obj"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mtd status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param show"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf latency"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "perf"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ps"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "pwm info"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sensors status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "sd_bench -r 2"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "top once"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "uorb status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
// run tests
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "critmon_start; sleep 30; critmon_stop"'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"'
} catch (Exception err) {
// always report passed for now
currentBuild.result = 'SUCCESS'
}
} // script
}
options {
timeout(time: 20, unit: 'MINUTES')
}
}

stage('px4_fmu-v5_irqmonitor') {
agent {
label 'px4_fmu-v5'
Expand All @@ -585,6 +659,8 @@ pipeline {
sh './platforms/nuttx/Debug/jlink_gdb_upload.sh build/px4_fmu-v5_irqmonitor/px4_fmu-v5_irqmonitor.elf'
sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600'
// status commands
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "irqinfo"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "adc test"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman status"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dmesg"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu status"'
Expand All @@ -606,7 +682,8 @@ pipeline {
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ver all"'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "irqinfo"'
// run tests
// sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`' // TODO: currently unusably slow
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`'
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "irqinfo"'
// ensure buzzer is disabled for the next test
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"'
} catch (Exception err) {
Expand Down
129 changes: 129 additions & 0 deletions boards/px4/fmu-v5/critmonitor.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@

px4_add_board(
PLATFORM nuttx
VENDOR px4
MODEL fmu-v5
LABEL critmonitor
TOOLCHAIN arm-none-eabi
ARCHITECTURE cortex-m7
ROMFSROOT px4fmu_common
IO px4_io-v2_default
TESTING
UAVCAN_INTERFACES 2

SERIAL_PORTS
GPS1:/dev/ttyS0
TEL1:/dev/ttyS1
TEL2:/dev/ttyS2
TEL4:/dev/ttyS3

DRIVERS
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
gps
#heater
imu/adis16448
imu/adis16497
#imu # all available imu drivers
imu/bmi055
imu/mpu6000
imu/mpu9250
irlock
lights/blinkm
lights/oreoled
lights/pca8574
lights/rgbled
lights/rgbled_ncp5623c
lights/rgbled_pwm
magnetometer # all available magnetometer drivers
#md25
mkblctrl
optical_flow # all available optical flow drivers
pca9685
power_monitor/ina226
#protocol_splitter
pwm_input
pwm_out_sim
px4fmu
px4io
rc_input
roboclaw
stm32
stm32/adc
stm32/tone_alarm
tap_esc
telemetry # all available telemetry drivers
test_ppm
tone_alarm
uavcan

MODULES
attitude_estimator_q
camera_feedback
commander
dataman
ekf2
events
fw_att_control
fw_pos_control_l1
rover_pos_control
land_detector
landing_target_estimator
load_mon
local_position_estimator
logger
mavlink
mc_att_control
mc_pos_control
navigator
sensors
sih
vmount
vtol_att_control
airspeed_selector

SYSTEMCMDS
bl_update
config
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

EXAMPLES
bottle_drop # OBC challenge
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
segway
uuv_example_app

)
Loading

0 comments on commit 40b5f94

Please sign in to comment.