From 66eacd24bc8ba26f6d22a4596c16040e841d5dc3 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sat, 11 Apr 2020 21:16:10 -0400 Subject: [PATCH] px4_fmu-v5_stackcheck: update stack sizes and add to Jenkins - increase stack sizes to run cleanly under stackcheck - this is likely overkill for most boards, but using stackcheck to set our minimum ensures we have a very safe margin on regular builds and it's something we can currently afford - remove holybro_durandal-v1_stackcheck from test rack (there's only one unit) --- .ci/Jenkinsfile-hardware | 88 ++++++++----------- .../mindpx-v2/nuttx-config/nsh/defconfig | 2 +- boards/av/x-v1/nuttx-config/nsh/defconfig | 2 +- .../crazyflie/nuttx-config/nsh/defconfig | 2 +- .../nuttx-config/bootloader/defconfig | 2 +- .../durandal-v1/nuttx-config/nsh/defconfig | 2 +- .../nuttx-config/stackcheck/defconfig | 2 +- .../kakutef7/nuttx-config/nsh/defconfig | 2 +- .../aerofc-v1/nuttx-config/nsh/defconfig | 2 +- .../modalai/fc-v1/nuttx-config/nsh/defconfig | 2 +- .../ctrl-zero-f7/nuttx-config/nsh/defconfig | 2 +- boards/mro/x21-777/nuttx-config/nsh/defconfig | 2 +- boards/mro/x21/nuttx-config/nsh/defconfig | 2 +- .../nxp/fmuk66-v3/nuttx-config/nsh/defconfig | 2 +- .../fmurt1062-v1/nuttx-config/nsh/defconfig | 2 +- .../omnibus/f4sd/nuttx-config/nsh/defconfig | 2 +- boards/px4/fmu-v2/nuttx-config/nsh/defconfig | 2 +- boards/px4/fmu-v3/nuttx-config/nsh/defconfig | 2 +- .../fmu-v3/nuttx-config/stackcheck/defconfig | 2 +- boards/px4/fmu-v4/nuttx-config/nsh/defconfig | 2 +- .../fmu-v4/nuttx-config/optimized/defconfig | 2 +- .../fmu-v4/nuttx-config/stackcheck/defconfig | 2 +- .../px4/fmu-v4pro/nuttx-config/nsh/defconfig | 2 +- .../fmu-v5/nuttx-config/critmonitor/defconfig | 2 +- .../fmu-v5/nuttx-config/irqmonitor/defconfig | 2 +- boards/px4/fmu-v5/nuttx-config/nsh/defconfig | 2 +- .../fmu-v5/nuttx-config/optimized/defconfig | 2 +- .../fmu-v5/nuttx-config/stackcheck/defconfig | 2 +- boards/px4/fmu-v5/stackcheck.cmake | 1 + boards/px4/fmu-v5x/nuttx-config/nsh/defconfig | 2 +- .../p2_base_phy_LAN8742Ai/defconfig | 2 +- boards/uvify/core/nuttx-config/nsh/defconfig | 2 +- .../px4_work_queue/WorkQueueManager.hpp | 30 +++---- 33 files changed, 84 insertions(+), 95 deletions(-) diff --git a/.ci/Jenkinsfile-hardware b/.ci/Jenkinsfile-hardware index bec2aa354b..5eeeef4538 100644 --- a/.ci/Jenkinsfile-hardware +++ b/.ci/Jenkinsfile-hardware @@ -509,9 +509,9 @@ pipeline { } } - stage("modalai_fc-v1_default") { + stage("px4_fmu-v5_stackcheck") { stages { - stage("build modalai_fc-v1_default") { + stage("build px4_fmu-v5_stackcheck") { agent { docker { image 'px4io/px4-dev-nuttx-bionic:2020-04-01' @@ -523,10 +523,10 @@ pipeline { sh 'make distclean' sh 'ccache -s' sh 'git fetch --tags' - sh 'make modalai_fc-v1_default' + sh 'make px4_fmu-v5_stackcheck' sh 'make sizes' sh 'ccache -s' - stash includes: 'build/modalai_fc-v1_default/modalai_fc-v1_default.elf', name: 'modalai_fc-v1_default' + stash includes: 'build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf', name: 'px4_fmu-v5_stackcheck' } post { always { @@ -536,42 +536,44 @@ pipeline { } // stage build stage("test") { agent { - label 'modalai_fc-v1' + label 'px4_fmu-v5' } stages { stage("flash") { steps { sh 'export' sh 'find /dev/serial' - unstash 'modalai_fc-v1_default' + unstash 'px4_fmu-v5_stackcheck' // flash board and watch bootup - sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_default/modalai_fc-v1_default.elf' - sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-SEGGER_*` --baudrate 57600' + sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/px4_fmu-v5_stackcheck/px4_fmu-v5_stackcheck.elf' + sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600' } } stage("configure") { steps { // configure - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set SYS_AUTOSTART 4001"' // generic vtol standardulticopter - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param save"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "reboot"' // reboot to apply + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set IMU_GYRO_RATEMAX 250"' // limit cpu usage + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set MAV_0_CONFIG 0"' // limit cpu usage + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 4001"' // generic multicopter + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param save"' + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply } } stage("status") { steps { - statusSEGGER() + statusFTDI() } } stage("tests") { steps { // run tests - sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-SEGGER_*`' + sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`' } } stage("reset") { steps { - cleanupSEGGER() + cleanupFTDI(); } } } @@ -582,9 +584,9 @@ pipeline { } } - stage("holybro_durandal-v1_default") { + stage("modalai_fc-v1_default") { stages { - stage("build holybro_durandal-v1_default") { + stage("build modalai_fc-v1_default") { agent { docker { image 'px4io/px4-dev-nuttx-bionic:2020-04-01' @@ -596,10 +598,10 @@ pipeline { sh 'make distclean' sh 'ccache -s' sh 'git fetch --tags' - sh 'make holybro_durandal-v1_default' + sh 'make modalai_fc-v1_default' sh 'make sizes' sh 'ccache -s' - stash includes: 'build/holybro_durandal-v1_default/holybro_durandal-v1_default.elf', name: 'holybro_durandal-v1_default' + stash includes: 'build/modalai_fc-v1_default/modalai_fc-v1_default.elf', name: 'modalai_fc-v1_default' } post { always { @@ -609,43 +611,42 @@ pipeline { } // stage build stage("test") { agent { - label 'holybro_durandal-v1' + label 'modalai_fc-v1' } stages { stage("flash") { steps { sh 'export' sh 'find /dev/serial' - unstash 'holybro_durandal-v1_default' + unstash 'modalai_fc-v1_default' // flash board and watch bootup - sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/holybro_durandal-v1_default/holybro_durandal-v1_default.elf' - sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600' + sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/modalai_fc-v1_default/modalai_fc-v1_default.elf' + sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-SEGGER_*` --baudrate 57600' } } stage("configure") { steps { // configure - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_AUTOSTART 13000"' // generic vtol standard - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param set SYS_BL_UPDATE 1"' // update bootloader - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "param save"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "reboot"' // reboot to apply + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set CBRK_BUZZER 782097"' // disable buzzer + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param set SYS_AUTOSTART 4001"' // generic vtol standardulticopter + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "param save"' + sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-SEGGER_*` --cmd "reboot"' // reboot to apply } } stage("status") { steps { - statusFTDI() + statusSEGGER() } } stage("tests") { steps { // run tests - sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`' + sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-SEGGER_*`' } } stage("reset") { steps { - cleanupFTDI(); + cleanupSEGGER() } } } @@ -656,9 +657,9 @@ pipeline { } } - stage("holybro_durandal-v1_stackcheck") { + stage("holybro_durandal-v1_default") { stages { - stage("build holybro_durandal-v1_stackcheck") { + stage("build holybro_durandal-v1_default") { agent { docker { image 'px4io/px4-dev-nuttx-bionic:2020-04-01' @@ -670,10 +671,10 @@ pipeline { sh 'make distclean' sh 'ccache -s' sh 'git fetch --tags' - sh 'make holybro_durandal-v1_stackcheck' + sh 'make holybro_durandal-v1_default' sh 'make sizes' sh 'ccache -s' - stash includes: 'build/holybro_durandal-v1_stackcheck/holybro_durandal-v1_stackcheck.elf', name: 'holybro_durandal-v1_stackcheck' + stash includes: 'build/holybro_durandal-v1_default/holybro_durandal-v1_default.elf', name: 'holybro_durandal-v1_default' } post { always { @@ -690,9 +691,9 @@ pipeline { steps { sh 'export' sh 'find /dev/serial' - unstash 'holybro_durandal-v1_stackcheck' + unstash 'holybro_durandal-v1_default' // flash board and watch bootup - sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/holybro_durandal-v1_stackcheck/holybro_durandal-v1_stackcheck.elf' + sh './platforms/nuttx/Debug/upload_jlink_gdb.sh build/holybro_durandal-v1_default/holybro_durandal-v1_default.elf' sh './Tools/HIL/monitor_firmware_upload.py --device `find /dev/serial -name *usb-FTDI_*` --baudrate 57600' } } @@ -717,19 +718,6 @@ pipeline { sh './Tools/HIL/run_tests.py --device `find /dev/serial -name *usb-FTDI_*`' } } - stage("stop modules") { - steps { - // manually stop everything - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "commander stop"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "mavlink stop-all"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "ekf2 stop"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "navigator stop"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "dataman stop"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "logger stop"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "fmu stop"' - sh './Tools/HIL/run_nsh_cmd.py --device `find /dev/serial -name *usb-FTDI_*` --cmd "px4io stop"' - } - } stage("reset") { steps { cleanupFTDI(); diff --git a/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig b/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig index 3cd755cbae..1600271d59 100644 --- a/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig +++ b/boards/airmind/mindpx-v2/nuttx-config/nsh/defconfig @@ -244,5 +244,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/av/x-v1/nuttx-config/nsh/defconfig b/boards/av/x-v1/nuttx-config/nsh/defconfig index 98c562636c..669a5480b4 100644 --- a/boards/av/x-v1/nuttx-config/nsh/defconfig +++ b/boards/av/x-v1/nuttx-config/nsh/defconfig @@ -271,5 +271,5 @@ CONFIG_USART6_RXBUFSIZE=600 CONFIG_USART6_RXDMA=y CONFIG_USART6_TXBUFSIZE=1500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/bitcraze/crazyflie/nuttx-config/nsh/defconfig b/boards/bitcraze/crazyflie/nuttx-config/nsh/defconfig index 8cd6950eb7..2645de9c5d 100644 --- a/boards/bitcraze/crazyflie/nuttx-config/nsh/defconfig +++ b/boards/bitcraze/crazyflie/nuttx-config/nsh/defconfig @@ -198,5 +198,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/holybro/durandal-v1/nuttx-config/bootloader/defconfig b/boards/holybro/durandal-v1/nuttx-config/bootloader/defconfig index 775638b820..16e477c2a4 100644 --- a/boards/holybro/durandal-v1/nuttx-config/bootloader/defconfig +++ b/boards/holybro/durandal-v1/nuttx-config/bootloader/defconfig @@ -105,5 +105,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="bootloader_main" diff --git a/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig b/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig index d25805835a..45c772c154 100644 --- a/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig +++ b/boards/holybro/durandal-v1/nuttx-config/nsh/defconfig @@ -248,6 +248,6 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_WATCHDOG=y diff --git a/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig b/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig index 758842d68f..c4357fc0d1 100644 --- a/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig +++ b/boards/holybro/durandal-v1/nuttx-config/stackcheck/defconfig @@ -249,6 +249,6 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_WATCHDOG=y diff --git a/boards/holybro/kakutef7/nuttx-config/nsh/defconfig b/boards/holybro/kakutef7/nuttx-config/nsh/defconfig index a56c766fa2..0757db93e2 100644 --- a/boards/holybro/kakutef7/nuttx-config/nsh/defconfig +++ b/boards/holybro/kakutef7/nuttx-config/nsh/defconfig @@ -226,5 +226,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/intel/aerofc-v1/nuttx-config/nsh/defconfig b/boards/intel/aerofc-v1/nuttx-config/nsh/defconfig index fb8c83f78d..979257cf2c 100644 --- a/boards/intel/aerofc-v1/nuttx-config/nsh/defconfig +++ b/boards/intel/aerofc-v1/nuttx-config/nsh/defconfig @@ -204,5 +204,5 @@ CONFIG_USART6_RXDMA=y CONFIG_USART6_SERIAL_CONSOLE=y CONFIG_USART6_TXBUFSIZE=300 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/modalai/fc-v1/nuttx-config/nsh/defconfig b/boards/modalai/fc-v1/nuttx-config/nsh/defconfig index 9bd822f021..0aabb2d44f 100644 --- a/boards/modalai/fc-v1/nuttx-config/nsh/defconfig +++ b/boards/modalai/fc-v1/nuttx-config/nsh/defconfig @@ -257,5 +257,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig b/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig index b0b07ae70c..8320bbdf82 100644 --- a/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig +++ b/boards/mro/ctrl-zero-f7/nuttx-config/nsh/defconfig @@ -245,5 +245,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/mro/x21-777/nuttx-config/nsh/defconfig b/boards/mro/x21-777/nuttx-config/nsh/defconfig index cd4ad9ea12..207a1e50fe 100644 --- a/boards/mro/x21-777/nuttx-config/nsh/defconfig +++ b/boards/mro/x21-777/nuttx-config/nsh/defconfig @@ -247,5 +247,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/mro/x21/nuttx-config/nsh/defconfig b/boards/mro/x21/nuttx-config/nsh/defconfig index f0bc8dcdc5..f14541227b 100644 --- a/boards/mro/x21/nuttx-config/nsh/defconfig +++ b/boards/mro/x21/nuttx-config/nsh/defconfig @@ -243,5 +243,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/nxp/fmuk66-v3/nuttx-config/nsh/defconfig b/boards/nxp/fmuk66-v3/nuttx-config/nsh/defconfig index b717f94483..29b65956ed 100644 --- a/boards/nxp/fmuk66-v3/nuttx-config/nsh/defconfig +++ b/boards/nxp/fmuk66-v3/nuttx-config/nsh/defconfig @@ -213,6 +213,6 @@ CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_DUALSPEED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_WATCHDOG=y diff --git a/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig b/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig index 6bba9a0bf7..abeae56c71 100644 --- a/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig +++ b/boards/nxp/fmurt1062-v1/nuttx-config/nsh/defconfig @@ -243,6 +243,6 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_WATCHDOG=y diff --git a/boards/omnibus/f4sd/nuttx-config/nsh/defconfig b/boards/omnibus/f4sd/nuttx-config/nsh/defconfig index e55f0b39ea..04a6bdd3b8 100644 --- a/boards/omnibus/f4sd/nuttx-config/nsh/defconfig +++ b/boards/omnibus/f4sd/nuttx-config/nsh/defconfig @@ -198,5 +198,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v2/nuttx-config/nsh/defconfig b/boards/px4/fmu-v2/nuttx-config/nsh/defconfig index 509b266705..0f232d5fe1 100644 --- a/boards/px4/fmu-v2/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v2/nuttx-config/nsh/defconfig @@ -249,5 +249,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v3/nuttx-config/nsh/defconfig b/boards/px4/fmu-v3/nuttx-config/nsh/defconfig index d70e3b4439..6d3734eb86 100644 --- a/boards/px4/fmu-v3/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v3/nuttx-config/nsh/defconfig @@ -248,5 +248,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig b/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig index 214684df08..f0ac4cbb42 100644 --- a/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig +++ b/boards/px4/fmu-v3/nuttx-config/stackcheck/defconfig @@ -249,5 +249,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v4/nuttx-config/nsh/defconfig b/boards/px4/fmu-v4/nuttx-config/nsh/defconfig index 1302c06297..3dd5c54556 100644 --- a/boards/px4/fmu-v4/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v4/nuttx-config/nsh/defconfig @@ -246,5 +246,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v4/nuttx-config/optimized/defconfig b/boards/px4/fmu-v4/nuttx-config/optimized/defconfig index 68cfd53c5c..8ad02f2ffd 100644 --- a/boards/px4/fmu-v4/nuttx-config/optimized/defconfig +++ b/boards/px4/fmu-v4/nuttx-config/optimized/defconfig @@ -247,5 +247,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig b/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig index 885f5674bb..453cb3f8fa 100644 --- a/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig +++ b/boards/px4/fmu-v4/nuttx-config/stackcheck/defconfig @@ -247,5 +247,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig b/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig index ad23b41a81..7695771b41 100644 --- a/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v4pro/nuttx-config/nsh/defconfig @@ -251,5 +251,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig b/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig index 881d51c8bd..acc1fc3faa 100644 --- a/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/critmonitor/defconfig @@ -254,5 +254,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig b/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig index 736d81ce61..48ad71260f 100644 --- a/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/irqmonitor/defconfig @@ -253,5 +253,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5/nuttx-config/nsh/defconfig b/boards/px4/fmu-v5/nuttx-config/nsh/defconfig index 98c7b92087..c6c9481871 100644 --- a/boards/px4/fmu-v5/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/nsh/defconfig @@ -252,5 +252,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5/nuttx-config/optimized/defconfig b/boards/px4/fmu-v5/nuttx-config/optimized/defconfig index 9f10130e41..396d1a8923 100644 --- a/boards/px4/fmu-v5/nuttx-config/optimized/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/optimized/defconfig @@ -253,5 +253,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig b/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig index 1f945ebfc9..0920c4813f 100644 --- a/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig +++ b/boards/px4/fmu-v5/nuttx-config/stackcheck/defconfig @@ -253,5 +253,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5/stackcheck.cmake b/boards/px4/fmu-v5/stackcheck.cmake index 45a09fd58b..316bfb0e9b 100644 --- a/boards/px4/fmu-v5/stackcheck.cmake +++ b/boards/px4/fmu-v5/stackcheck.cmake @@ -67,6 +67,7 @@ px4_add_board( commander dataman ekf2 + #esc_battery events fw_att_control fw_pos_control_l1 diff --git a/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig b/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig index b5373cd0aa..8c1b47363c 100644 --- a/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig +++ b/boards/px4/fmu-v5x/nuttx-config/nsh/defconfig @@ -292,5 +292,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/px4/fmu-v5x/nuttx-config/p2_base_phy_LAN8742Ai/defconfig b/boards/px4/fmu-v5x/nuttx-config/p2_base_phy_LAN8742Ai/defconfig index c56412d1ac..b1f59b4101 100644 --- a/boards/px4/fmu-v5x/nuttx-config/p2_base_phy_LAN8742Ai/defconfig +++ b/boards/px4/fmu-v5x/nuttx-config/p2_base_phy_LAN8742Ai/defconfig @@ -293,5 +293,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/boards/uvify/core/nuttx-config/nsh/defconfig b/boards/uvify/core/nuttx-config/nsh/defconfig index 26988c8304..d71cca00c5 100644 --- a/boards/uvify/core/nuttx-config/nsh/defconfig +++ b/boards/uvify/core/nuttx-config/nsh/defconfig @@ -246,5 +246,5 @@ CONFIG_USBDEV=y CONFIG_USBDEV_BUSPOWERED=y CONFIG_USBDEV_MAXPOWER=500 CONFIG_USEC_PER_TICK=1000 -CONFIG_USERMAIN_STACKSIZE=2688 +CONFIG_USERMAIN_STACKSIZE=2944 CONFIG_USER_ENTRYPOINT="nsh_main" diff --git a/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp b/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp index 30a7d123b2..98b3dd4deb 100644 --- a/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp +++ b/platforms/common/include/px4_platform_common/px4_work_queue/WorkQueueManager.hpp @@ -48,21 +48,21 @@ struct wq_config_t { namespace wq_configurations { -static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 1600, 0}; // PX4 inner loop highest priority - -static constexpr wq_config_t SPI0{"wq:SPI0", 2368, -1}; -static constexpr wq_config_t SPI1{"wq:SPI1", 2368, -2}; -static constexpr wq_config_t SPI2{"wq:SPI2", 2368, -3}; -static constexpr wq_config_t SPI3{"wq:SPI3", 2368, -4}; -static constexpr wq_config_t SPI4{"wq:SPI4", 2368, -5}; -static constexpr wq_config_t SPI5{"wq:SPI5", 2368, -6}; -static constexpr wq_config_t SPI6{"wq:SPI6", 2368, -7}; - -static constexpr wq_config_t I2C0{"wq:I2C0", 1400, -8}; -static constexpr wq_config_t I2C1{"wq:I2C1", 1400, -9}; -static constexpr wq_config_t I2C2{"wq:I2C2", 1400, -10}; -static constexpr wq_config_t I2C3{"wq:I2C3", 1400, -11}; -static constexpr wq_config_t I2C4{"wq:I2C4", 1400, -12}; +static constexpr wq_config_t rate_ctrl{"wq:rate_ctrl", 1664, 0}; // PX4 inner loop highest priority + +static constexpr wq_config_t SPI0{"wq:SPI0", 2496, -1}; +static constexpr wq_config_t SPI1{"wq:SPI1", 2496, -2}; +static constexpr wq_config_t SPI2{"wq:SPI2", 2496, -3}; +static constexpr wq_config_t SPI3{"wq:SPI3", 2496, -4}; +static constexpr wq_config_t SPI4{"wq:SPI4", 2496, -5}; +static constexpr wq_config_t SPI5{"wq:SPI5", 2496, -6}; +static constexpr wq_config_t SPI6{"wq:SPI6", 2496, -7}; + +static constexpr wq_config_t I2C0{"wq:I2C0", 1472, -8}; +static constexpr wq_config_t I2C1{"wq:I2C1", 1472, -9}; +static constexpr wq_config_t I2C2{"wq:I2C2", 1472, -10}; +static constexpr wq_config_t I2C3{"wq:I2C3", 1472, -11}; +static constexpr wq_config_t I2C4{"wq:I2C4", 1472, -12}; // PX4 att/pos controllers, highest priority after sensors. static constexpr wq_config_t att_pos_ctrl{"wq:att_pos_ctrl", 7200, -13};