diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-31 15:39:37 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-10-31 16:00:34 -0600 |
commit | 3c81186daf97cf7011fd2806dfd0bc3b875e92f3 (patch) | |
tree | 30a6a4b50ab2eb15e7c6dcf934dc6052bbea0224 /cmd/sbc_harness/CMakeLists.txt | |
parent | f2d53195fd86023d2ff9fcce68d2e150bfd97059 (diff) |
Clean up the build system
Diffstat (limited to 'cmd/sbc_harness/CMakeLists.txt')
-rw-r--r-- | cmd/sbc_harness/CMakeLists.txt | 16 |
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 ######################################################################### |