Our custom vtol type gives a ‘[load_mon] vtol_att_control low on stack’ warning intermittently.
I found I can eliminate this warning by increasing the stack size called in px4_spawn_task in vtol_att_control_main.cpp from 1230 to 1300.
Can anyone give some guidance on how these different stack values need to match up to fly safely?
- A module’s STACK_MAIN value defined in CMakeLists
- The value called by the module’s main px4_spawn_task function
- A board’s nsh/defconfig CONFIG_USERMAIN_STACKSIZE
For example, am I good as long as the value in px4_spawn_task is less than the STACK_MAIN? Does it need to be less by an amount or can it be equal?