summaryrefslogtreecommitdiff
path: root/cmd/sbc_harness/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/sbc_harness/CMakeLists.txt')
-rw-r--r--cmd/sbc_harness/CMakeLists.txt16
1 files changed, 3 insertions, 13 deletions
diff --git a/cmd/sbc_harness/CMakeLists.txt b/cmd/sbc_harness/CMakeLists.txt
index 85e61ab..2018cf7 100644
--- a/cmd/sbc_harness/CMakeLists.txt
+++ b/cmd/sbc_harness/CMakeLists.txt
@@ -5,7 +5,7 @@
if (PICO_PLATFORM STREQUAL "rp2040")
-# Main compilation #############################################################
+# Compile ######################################################################
add_library(sbc_harness_objs
main.c
@@ -27,19 +27,9 @@ pico_enable_stdio_uart(sbc_harness_objs 1)
pico_enable_stdio_semihosting(sbc_harness_objs 0)
pico_enable_stdio_rtt(sbc_harness_objs 0)
-# Stack analysis ###############################################################
+# Analyze the stack ############################################################
-target_compile_options(sbc_harness_objs PUBLIC "-fcallgraph-info=su,da")
-set_source_files_properties(sbc_harness_stack.c PROPERTIES
- GENERATED true
-)
-add_custom_command(
- OUTPUT sbc_harness_stack.c
- COMMAND set -o pipefail && cat -- "$<LIST:TRANSFORM,$<LIST:FILTER,$<TARGET_OBJECTS:sbc_harness_objs>,INCLUDE,\.c\.o(bj)?$>,REPLACE,\.o(bj)?$,.ci>" | sed 's,^,//,' >sbc_harness_stack.c
- COMMAND_EXPAND_LISTS
- DEPENDS $<TARGET_OBJECTS:sbc_harness_objs>
- COMMENT "Calculating sbc_harness required stack sizes"
-)
+add_stack_analysis(sbc_harness_stack.c sbc_harness_objs)
# Link #########################################################################