This is an automated email from the ASF dual-hosted git repository.

xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 8a26212484de4ef8068d5c08bdbb38a402c2e7d6
Author: xuxingliang <[email protected]>
AuthorDate: Tue Dec 2 14:34:42 2025 +0800

    tricore: add stack usage compile options
    
    Add missing cmake CONFIG_STACK_USAGE and CONFIG_STACK_USAGE_WARNING support
    
    Signed-off-by: xuxingliang <[email protected]>
---
 arch/tricore/src/cmake/gcc.cmake | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/arch/tricore/src/cmake/gcc.cmake b/arch/tricore/src/cmake/gcc.cmake
index 32a47951a54..9cabe97f4de 100644
--- a/arch/tricore/src/cmake/gcc.cmake
+++ b/arch/tricore/src/cmake/gcc.cmake
@@ -85,6 +85,15 @@ if(CONFIG_STACK_CANARIES)
   add_compile_options(${CONFIG_STACK_CANARIES_LEVEL})
 endif()
 
+if(CONFIG_STACK_USAGE)
+  add_compile_options(-fstack-usage)
+endif()
+
+if(CONFIG_STACK_USAGE_WARNING AND NOT "${CONFIG_STACK_USAGE_WARNING}" STREQUAL
+                                  "0")
+  add_compile_options(-Wstack-usage=${CONFIG_STACK_USAGE_WARNING})
+endif()
+
 if(CONFIG_COVERAGE_ALL)
   add_compile_options(-fprofile-arcs -ftest-coverage -fno-inline)
 endif()

Reply via email to