2019-02-26 20:22:16 -04:00
|
|
|
#!/usr/bin/env groovy
|
|
|
|
|
2018-08-17 10:28:51 -03:00
|
|
|
pipeline {
|
|
|
|
agent none
|
|
|
|
stages {
|
2019-11-03 17:31:43 -04:00
|
|
|
stage('Hardware Test') {
|
2018-08-17 10:28:51 -03:00
|
|
|
|
|
|
|
parallel {
|
|
|
|
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("cubepilot_cubeorange_test") {
|
2021-01-31 18:23:57 -04:00
|
|
|
stages {
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("build cubepilot_cubeorange_test") {
|
2021-01-31 18:23:57 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-11-15 19:47:38 -04:00
|
|
|
sh 'make cubepilot_cubeorange_bootloader'
|
2021-04-13 11:28:39 -03:00
|
|
|
sh 'make cubepilot_cubeorange_test'
|
2021-01-31 18:23:57 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*, build/cubepilot_cubeorange_test/etc/init.d/airframes/*', name: 'cubepilot_cubeorange_test'
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2021-01-31 18:23:57 -04:00
|
|
|
agent {
|
|
|
|
label 'cubepilot_cubeorange'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-04-13 11:28:39 -03:00
|
|
|
unstash 'cubepilot_cubeorange_test'
|
2021-11-15 19:47:38 -04:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_bootloader/cubepilot_cubeorange_bootloader.elf'
|
2021-01-31 18:23:57 -04:00
|
|
|
// flash board and watch bootup
|
2021-04-13 11:28:39 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2021-01-31 18:23:57 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// run tests
|
|
|
|
runTests()
|
2021-11-22 12:17:48 -04:00
|
|
|
|
|
|
|
// load all airframes
|
|
|
|
// sh("./Tools/HIL/test_airframes.sh `find /dev/serial -name *usb-*` `cd build/cubepilot_cubeorange_test/etc/init.d/airframes/; find . -regex '.*/[0-9].*' -exec basename {} \\; | cut -d '_' -f 1` || true") // test loading all airframes\
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_RATEMAX" --value "2000"'
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "13000"' // generic vtol standard
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"' // run logger
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
|
|
|
quickCalibrate()
|
2021-08-17 00:46:27 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status"'
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"' // stop logger
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2021-01-31 19:54:49 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/cubepilot_cubeorange_test/cubepilot_cubeorange_test.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
} // stage test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-04 22:18:16 -03:00
|
|
|
stage("cuav_x7pro_test") {
|
2021-01-31 19:54:49 -04:00
|
|
|
stages {
|
2021-04-04 22:18:16 -03:00
|
|
|
stage("build cuav_x7pro_test") {
|
2021-01-31 19:54:49 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-11-15 19:47:38 -04:00
|
|
|
sh 'make cuav_x7pro_bootloader'
|
2021-04-04 22:18:16 -03:00
|
|
|
sh 'make cuav_x7pro_test'
|
2021-01-31 19:54:49 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'cuav_x7pro_test'
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2021-01-31 19:54:49 -04:00
|
|
|
agent {
|
|
|
|
label 'cuav_x7pro'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-04-04 22:18:16 -03:00
|
|
|
unstash 'cuav_x7pro_test'
|
2021-11-15 19:47:38 -04:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cuav_x7pro_bootloader/cuav_x7pro_bootloader.elf'
|
2021-01-31 19:54:49 -04:00
|
|
|
// flash board and watch bootup
|
2021-04-04 22:18:16 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/cuav_x7pro_test/cuav_x7pro_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2021-01-31 19:54:49 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
runTests()
|
2021-01-31 19:54:49 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_RATEMAX" --value "2000"'
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "13000"' // generic vtol standard
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"' // run logger
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
|
|
|
quickCalibrate()
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"' // stop logger
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2021-01-31 18:23:57 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/cuav_x7pro_test/cuav_x7pro_test.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2021-01-31 18:23:57 -04:00
|
|
|
}
|
|
|
|
} // stage test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("px4_fmu-v4_test") {
|
2019-11-03 17:31:43 -04:00
|
|
|
stages {
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("build px4_fmu-v4_test") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-04-13 11:28:39 -03:00
|
|
|
sh 'make px4_fmu-v4_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh 'make px4_fmu-v4_test bootloader_elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v4_test'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
label 'px4_fmu-v4'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-04-13 11:28:39 -03:00
|
|
|
unstash 'px4_fmu-v4_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_test/px4_fmu-v4_bootloader.elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
// flash board and watch bootup
|
2021-04-13 11:28:39 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2019-11-03 17:31:43 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
runTests()
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "4001"' // generic quadcopter
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"' // run logger
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
|
|
|
quickCalibrate()
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"' // stop logger
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2020-03-22 18:50:17 -03:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v4_test/px4_fmu-v4_test.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
} // stage test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("px4_fmu-v4pro_test") {
|
2019-11-03 17:31:43 -04:00
|
|
|
stages {
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("build px4_fmu-v4pro_test") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-04-13 11:28:39 -03:00
|
|
|
sh 'make px4_fmu-v4pro_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh 'make px4_fmu-v4pro_test bootloader_elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v4pro_test'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
label 'px4_fmu-v4pro'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-04-13 11:28:39 -03:00
|
|
|
unstash 'px4_fmu-v4pro_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_bootloader.elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
// flash board and watch bootup
|
2021-04-13 11:28:39 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2019-11-03 17:31:43 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
runTests()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "13000"' // generic vtol standard
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"' // run logger
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
|
|
|
quickCalibrate()
|
2021-08-17 00:46:27 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status"'
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"' // stop logger
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2019-11-03 17:31:43 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v4pro_test/px4_fmu-v4pro_test.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
} // stage test
|
2019-02-27 00:03:24 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("px4_fmu-v5_debug") {
|
2019-11-03 17:31:43 -04:00
|
|
|
stages {
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("build px4_fmu-v5_debug") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-07-18 12:09:49 -03:00
|
|
|
sh 'make px4_fmu-v5_debug'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh 'make px4_fmu-v5_debug bootloader_elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v5_debug'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
label 'px4_fmu-v5'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-07-18 20:45:19 -03:00
|
|
|
unstash 'px4_fmu-v5_debug'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SYS_AUTOSTART 0" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save" || true'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_debug/px4_fmu-v5_bootloader.elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
// flash board and watch bootup
|
2021-08-16 23:29:23 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_debug/px4_fmu-v5_debug.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600 || true'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2020-03-22 18:50:17 -03:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
2021-10-04 15:21:33 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb top -1"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
2021-10-04 15:21:33 -03:00
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -v"'
|
2022-01-02 15:47:52 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -u -v" || true'
|
2021-10-04 15:21:33 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_stress"'
|
2021-12-06 23:17:14 -04:00
|
|
|
|
2021-12-23 14:14:26 -04:00
|
|
|
// test dataman
|
2023-06-19 06:17:17 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests dataman" --ignore-stdout-errors'
|
2021-12-06 23:17:14 -04:00
|
|
|
|
2021-10-04 15:21:33 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests file" || true'
|
2021-08-23 17:45:46 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests latency_test" || true'
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SYS_AUTOSTART 4001" || true' // generic quadcopter
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
2021-07-15 20:17:48 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status" || true'
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2020-03-22 18:50:17 -03:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2020-07-05 15:27:21 -03:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v5_debug/px4_fmu-v5_debug.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2020-07-05 15:27:21 -03:00
|
|
|
}
|
|
|
|
} // stage test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("px4_fmu-v5_stackcheck") {
|
2020-03-22 18:50:17 -03:00
|
|
|
stages {
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("build px4_fmu-v5_stackcheck") {
|
2020-03-22 18:50:17 -03:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-07-18 12:09:49 -03:00
|
|
|
sh 'make px4_fmu-v5_stackcheck'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh 'make px4_fmu-v5_stackcheck bootloader_elf'
|
2020-03-22 18:50:17 -03:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v5_stackcheck'
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2020-03-22 18:50:17 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2020-03-22 18:50:17 -03:00
|
|
|
agent {
|
|
|
|
label 'px4_fmu-v5'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-07-18 20:45:19 -03:00
|
|
|
unstash 'px4_fmu-v5_stackcheck'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SYS_AUTOSTART 0" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save" || true'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_bootloader.elf'
|
2020-03-22 18:50:17 -03:00
|
|
|
// flash board and watch bootup
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2019-11-03 17:31:43 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
2021-08-23 17:45:46 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests latency_test" || true'
|
2021-12-23 14:14:26 -04:00
|
|
|
|
|
|
|
// test dataman
|
2023-06-19 06:17:17 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests dataman" --ignore-stdout-errors'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SYS_AUTOSTART 4001" || true' // generic quadcopter
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
2021-07-15 20:17:48 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status" || true'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2019-11-03 17:31:43 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
} // stage test
|
2019-08-30 01:40:22 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("px4_fmu-v5_test") {
|
2019-11-27 12:24:01 -04:00
|
|
|
stages {
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("build px4_fmu-v5_test") {
|
2019-11-27 12:24:01 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-07-18 12:09:49 -03:00
|
|
|
sh 'make px4_fmu-v5_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh 'make px4_fmu-v5_test bootloader_elf'
|
2019-11-27 12:24:01 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'px4_fmu-v5_test'
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2019-11-27 12:24:01 -04:00
|
|
|
agent {
|
2020-04-11 22:16:10 -03:00
|
|
|
label 'px4_fmu-v5'
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-07-18 12:09:49 -03:00
|
|
|
unstash 'px4_fmu-v5_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_test/px4_fmu-v5_bootloader.elf'
|
2019-11-27 12:24:01 -04:00
|
|
|
// flash board and watch bootup
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2019-11-27 12:24:01 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
runTests()
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "4001"' // generic quadcopter
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"' // run logger
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
|
|
|
quickCalibrate()
|
2021-07-15 20:17:48 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "px4io status" || true'
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"' // stop logger
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2019-11-27 12:24:01 -04:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/px4_fmu-v5_test/px4_fmu-v5_test.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
2019-11-03 17:31:43 -04:00
|
|
|
} // stage test
|
2019-08-16 20:01:16 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("nxp_fmuk66-v3_test") {
|
2019-11-03 17:31:43 -04:00
|
|
|
stages {
|
2021-04-13 11:28:39 -03:00
|
|
|
stage("build nxp_fmuk66-v3_test") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
docker {
|
2023-07-18 14:26:38 -03:00
|
|
|
image 'px4io/px4-dev-nuttx-focal:2022-08-12'
|
2021-10-01 11:50:44 -03:00
|
|
|
args '--cpu-shares 512 -e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
steps {
|
2021-10-04 12:48:40 -03:00
|
|
|
checkoutSCM()
|
2021-04-13 11:28:39 -03:00
|
|
|
sh 'make nxp_fmuk66-v3_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
//sh 'make nxp_fmuk66-v3_test bootloader_elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
sh 'ccache -s'
|
2021-11-26 14:14:29 -04:00
|
|
|
stash includes: 'build/*/*.elf, platforms/nuttx/Debug/*, platforms/nuttx/NuttX/nuttx/tools/nuttx-gdbinit, Tools/HIL/*', name: 'nxp_fmuk66-v3_test'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-01-01 22:04:47 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} // stage build
|
2021-07-19 00:33:00 -03:00
|
|
|
stage("hardware") {
|
2019-11-03 17:31:43 -04:00
|
|
|
agent {
|
|
|
|
label 'nxp_fmuk66-v3'
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage("flash") {
|
|
|
|
steps {
|
|
|
|
sh 'export'
|
|
|
|
sh 'find /dev/serial'
|
2021-04-13 11:28:39 -03:00
|
|
|
unstash 'nxp_fmuk66-v3_test'
|
2021-07-19 00:33:00 -03:00
|
|
|
//sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_bootloader.elf'
|
2019-11-03 17:31:43 -04:00
|
|
|
// flash board and watch bootup
|
2021-04-13 11:28:39 -03:00
|
|
|
sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf && ./Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-*` --baudrate 57600'
|
2021-11-24 11:16:05 -04:00
|
|
|
resetBoard()
|
2019-11-03 17:31:43 -04:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("tests") {
|
2020-06-24 00:04:35 -03:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
runTests()
|
2020-06-24 00:04:35 -03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
stage("status") {
|
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
// configure
|
|
|
|
resetParameters()
|
2021-08-23 23:16:12 -03:00
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_RATEMAX" --value "400"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_AUTOSTART" --value "4001"' // generic quadcopter
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SYS_BL_UPDATE" --value "1"' // update bootloader
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger on"' // run logger
|
2021-07-18 12:09:49 -03:00
|
|
|
checkStatus()
|
|
|
|
quickCalibrate()
|
2022-11-22 13:00:54 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger off"' // stop logger
|
2020-06-24 00:04:35 -03:00
|
|
|
}
|
|
|
|
}
|
2021-07-18 12:09:49 -03:00
|
|
|
stage("print topics") {
|
2020-06-24 00:04:35 -03:00
|
|
|
steps {
|
2021-07-18 12:09:49 -03:00
|
|
|
printTopics()
|
2020-06-24 00:04:35 -03:00
|
|
|
}
|
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2022-02-08 14:23:14 -04:00
|
|
|
sh 'cat /tmp/pyserial_spy_file.txt || true'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './platforms/nuttx/Debug/jlink_gdb_backtrace_simple.sh build/nxp_fmuk66-v3_test/nxp_fmuk66-v3_test.elf || true'
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|
2020-06-24 00:04:35 -03:00
|
|
|
}
|
|
|
|
} // stage test
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-17 10:28:51 -03:00
|
|
|
} // parallel
|
2019-11-03 17:31:43 -04:00
|
|
|
} // stage Hardware Test
|
2018-08-17 10:28:51 -03:00
|
|
|
} // stages
|
|
|
|
environment {
|
|
|
|
CCACHE_DIR = '/tmp/ccache'
|
2021-07-16 21:35:34 -03:00
|
|
|
CCACHE_NOHASHDIR = 1
|
2018-08-17 10:28:51 -03:00
|
|
|
CI = true
|
|
|
|
}
|
|
|
|
options {
|
2021-05-16 16:33:35 -03:00
|
|
|
buildDiscarder(logRotator(numToKeepStr: '30', artifactDaysToKeepStr: '60'))
|
2021-09-29 21:37:07 -03:00
|
|
|
timeout(time: 180, unit: 'MINUTES')
|
2021-02-12 00:04:26 -04:00
|
|
|
skipDefaultCheckout()
|
2018-08-17 10:28:51 -03:00
|
|
|
}
|
|
|
|
}
|
2019-11-27 12:24:01 -04:00
|
|
|
|
2021-10-04 12:48:40 -03:00
|
|
|
void checkoutSCM() {
|
|
|
|
retry(3) {
|
|
|
|
checkout scm
|
|
|
|
sh 'export'
|
2021-12-29 12:50:07 -04:00
|
|
|
sh 'make distclean; git clean -ff -x -d .'
|
2021-10-04 12:48:40 -03:00
|
|
|
sh 'git fetch --tags'
|
|
|
|
sh 'ccache -z'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
void quickCalibrate() {
|
|
|
|
|
2021-10-11 16:21:43 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CAL_*"' // parameters before
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors status"'
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "gyro_calibration status || true"'
|
|
|
|
|
2022-03-04 10:51:02 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate accel quick; sleep 1"'
|
2021-10-11 16:21:43 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CAL_ACC*"'
|
|
|
|
|
2022-03-04 10:51:02 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate gyro; sleep 2"'
|
2021-10-11 16:21:43 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CAL_GYRO*"'
|
|
|
|
|
2022-03-04 10:51:02 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate level; sleep 2"'
|
2021-10-11 16:21:43 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show SENS*"'
|
|
|
|
|
2022-03-04 10:51:02 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate mag quick; sleep 1"'
|
2021-10-11 16:21:43 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CAL_MAG*"'
|
|
|
|
|
2022-03-04 10:51:02 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander calibrate baro; sleep 5"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CAL_BARO*"'
|
|
|
|
|
2021-10-11 16:21:43 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show CAL_*"' // parameters after
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors status"'
|
2021-07-16 11:19:45 -03:00
|
|
|
}
|
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
void checkStatus() {
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param status"'
|
2021-08-24 10:03:35 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show SYS*"'
|
2022-12-19 18:09:23 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "bsondump /fs/mtd_params"'
|
2021-07-18 12:09:49 -03:00
|
|
|
|
2021-07-16 11:19:45 -03:00
|
|
|
// status commands
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/blocks"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/mount"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/fs/usage"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/meminfo"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "cat /proc/uptime"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander check" || true'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander status"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "dataman status"'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "df -h"'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "df"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ekf2 status"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "free"'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "gps status"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener cpuload; top once; listener cpuload"'
|
2021-12-24 14:46:36 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "logger status"'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /"'
|
2021-08-25 21:00:14 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /bin"'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /dev"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /etc"'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /fs"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /fs/microsd"'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /obj"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /proc"'
|
2022-01-01 22:04:47 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /proc/fs"'
|
2021-10-03 16:32:54 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink status streams" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink status" || true'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mount"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd status"'
|
2022-12-19 18:09:23 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "bsondump /fs/mtd_params"'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param show" || true'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param status"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "perf latency"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "perf"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ps"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "pwm_out status"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors status"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uavcan status" || true'
|
2022-01-18 13:23:05 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb status" || true'
|
2022-02-07 11:26:46 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb top -1 -a" || true'
|
2021-07-16 11:19:45 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ver all"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
2019-11-27 12:24:01 -04:00
|
|
|
}
|
2019-12-03 15:26:54 -04:00
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
void resetParameters() {
|
2021-01-31 18:23:57 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param reset_all"'
|
2021-07-16 11:05:12 -03:00
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "CBRK_BUZZER" --value "782097"'
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SDLOG_DIRS_MAX" --value "1"'
|
2021-07-18 12:09:49 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
void runTests() {
|
2021-11-22 12:17:48 -04:00
|
|
|
|
|
|
|
// test loading a range of airframes
|
2022-08-25 10:48:49 -03:00
|
|
|
sh './Tools/HIL/test_airframes.sh `find /dev/serial -name *usb-*` 2100 3000 4001 6001 8001'
|
2021-11-22 12:17:48 -04:00
|
|
|
|
2021-07-18 12:09:49 -03:00
|
|
|
resetParameters()
|
|
|
|
|
2021-09-21 19:42:16 -03:00
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_CAL_EN" --value "0" || true' // disable during testing
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "IMU_GYRO_FFT_EN" --value "0" || true' // disable during testing
|
2022-01-11 11:43:18 -04:00
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SENS_IMU_AUTOCAL" --value "0" || true' // disable during testing
|
|
|
|
sh './Tools/HIL/nsh_param_set.py --device `find /dev/serial -name *usb-*` --name "SENS_MAG_AUTOCAL" --value "0" || true' // disable during testing
|
2021-09-21 19:42:16 -03:00
|
|
|
|
2021-01-31 18:23:57 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param save"'
|
2021-11-19 17:05:46 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
2021-07-18 12:09:49 -03:00
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "top once"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "work_queue status"'
|
2019-12-03 15:26:54 -04:00
|
|
|
|
2023-01-11 17:35:14 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors stop"' // ignore irrelevant sensor timeouts during test
|
2022-05-29 13:51:13 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ostest"'
|
2022-05-29 22:28:06 -03:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot after ostest
|
2022-05-29 13:51:13 -03:00
|
|
|
|
2023-01-11 17:35:14 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors stop"' // ignore irrelevant sensor timeouts during test
|
2021-08-23 17:45:46 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander_tests" || true'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "controllib_test"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "lightware_laser_test"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink_tests" || true' // TODO
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests"'
|
2021-08-23 17:45:46 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb_tests latency_test" || true'
|
2021-07-18 12:09:49 -03:00
|
|
|
|
2021-11-24 11:19:11 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "tests file" || true'
|
2021-07-18 12:09:49 -03:00
|
|
|
|
2022-12-19 18:09:23 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "bsondump /fs/mtd_params"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd readtest"'
|
2022-12-19 18:09:23 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "bsondump /fs/mtd_params"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd rwtest"'
|
2022-12-19 18:09:23 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "bsondump /fs/mtd_params"'
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mtd erase"'
|
2022-12-19 18:09:23 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "bsondump /fs/mtd_params" || true' // expected to fail after erase
|
2021-07-18 12:09:49 -03:00
|
|
|
|
2021-08-24 14:01:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench"'
|
2021-10-04 15:21:33 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -v"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_bench -u -v"'
|
2021-08-24 14:01:49 -03:00
|
|
|
|
2021-10-04 15:21:33 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sd_stress"'
|
2021-09-23 10:55:38 -03:00
|
|
|
|
2021-12-06 23:17:14 -04:00
|
|
|
// tests (stop modules first)
|
2021-10-13 21:04:20 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "commander stop"'
|
2021-12-06 23:17:14 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "mavlink stop-all"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "navigator stop"'
|
|
|
|
sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-*`'
|
|
|
|
|
2021-09-05 19:33:42 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "sensors stop"' // ignore irrelevant sensor timeouts during microbenchmarks
|
2021-07-18 12:09:49 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "microbench all"'
|
2021-08-24 15:09:43 -03:00
|
|
|
|
2022-01-01 13:10:28 -04:00
|
|
|
//sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "calib_udelay"'
|
2021-07-18 12:09:49 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
void printTopics() {
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "ls /obj"'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb status"'
|
2022-02-07 11:26:46 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "uorb top -1 -a" || true'
|
2021-07-18 12:09:49 -03:00
|
|
|
|
2021-08-25 11:26:07 -03:00
|
|
|
// these are for casually inspecting the system, output failure doesn't matter
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener actuator_armed" || true'
|
2023-07-25 18:15:21 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener actuator_controls_0" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener actuator_controls_1" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener actuator_controls_2" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener actuator_outputs" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener adc_report" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener airspeed_validated" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener airspeed_wind" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener battery_status" || true'
|
2023-07-25 18:15:21 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener commander_state" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener cpuload" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener distance_sensor" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener ekf2_timestamps" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener esc_status" || true'
|
2022-03-15 11:27:46 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_fake_pos" || true'
|
2022-03-15 11:31:03 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_gnss_pos" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_aid_src_gnss_vel" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_attitude" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_baro_bias" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_event_flags" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_global_position" || true'
|
2022-03-15 11:27:46 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_gps_status" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_test_ratios" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovation_variances" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_innovations" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_local_position" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_odometry" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_optical_flow_vel" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_selector_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_sensor_bias" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_states" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_status_flags" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener estimator_wind" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener event" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener heater_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener input_rc" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener led_control" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener log_message" || true'
|
2021-08-23 23:33:21 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener logger_status" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener manual_control_setpoint" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener mavlink_log" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener mission" || true'
|
2023-07-25 18:15:21 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener multirotor_motor_limits" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener optical_flow" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener parameter_update" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener position_controller_landing_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener position_setpoint_triplet" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener radio_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener rate_ctrl_status" || true'
|
2023-07-25 18:15:21 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener safety" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_accel" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_accel_fifo" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_baro" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_combined" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_gyro" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_gyro_fft" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_gyro_fifo" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_mag" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_preflight_mag" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensor_selection" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener sensors_status_imu" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener system_power" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener task_stack_info" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener telemetry_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener trajectory_setpoint" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener tune_control" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_acceleration" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_air_data" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_angular_velocity" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_attitude" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_attitude_setpoint" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_command" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_command_ack" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_control_mode" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_global_position" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_imu" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_imu_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_land_detected" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_local_position" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_local_position_setpoint" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_magnetometer" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_odometry" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_rates_setpoint" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vehicle_status" || true'
|
2023-07-25 18:15:21 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener failsafe_flags" || true'
|
2021-08-25 11:26:07 -03:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener vtol_vehicle_status" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "listener yaw_estimator_status" || true'
|
2019-12-03 15:26:54 -04:00
|
|
|
}
|
2021-08-24 12:36:09 -03:00
|
|
|
|
|
|
|
void resetBoard() {
|
|
|
|
resetParameters()
|
|
|
|
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SYS_AUTOSTART 0" || true'
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set IMU_GYRO_RATEMAX 200" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_0_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set MAV_1_CONFIG 0" || true' // limit cpu usage
|
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "param set SDLOG_MODE -1" || true' // limit cpu usage
|
2021-11-24 11:16:05 -04:00
|
|
|
sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-*` --cmd "echo > /fs/microsd/.format" || true'
|
2021-11-19 17:05:46 -04:00
|
|
|
sh './Tools/HIL/reboot.py --device `find /dev/serial -name *usb-*`' // reboot to apply
|
2021-08-24 12:36:09 -03:00
|
|
|
}
|