From c7aaf52fd482e99d2427d109a5419ceedb13cfa2 Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Wed, 20 Jul 2022 12:09:18 +0400 Subject: [PATCH] Double the allocated stack size of 64-bit NuttX built-in modules Signed-off-by: Jukka Laitinen --- cmake/px4_add_module.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/px4_add_module.cmake b/cmake/px4_add_module.cmake index d07c98df00..5c0ee1153d 100644 --- a/cmake/px4_add_module.cmake +++ b/cmake/px4_add_module.cmake @@ -202,6 +202,9 @@ function(px4_add_module) set_target_properties(${MODULE} PROPERTIES STACK_MAX ${STACK_MAX}) if(${PX4_PLATFORM} STREQUAL "nuttx") + # double the allocated stacks for 64 bit nuttx targets + set(STACK_MAIN "${STACK_MAIN} * (__SIZEOF_POINTER__ >> 2)") + target_compile_options(${MODULE} PRIVATE -Wframe-larger-than=${STACK_MAX}) endif()