Allow silencing of memory usage
For many users memory usage is a simple boolean: does TF-M fit
in its allocated area. Since the linker scripts will error when
TF-M does not fit, the memory usage prints are not useful to these
users.
This commit allows these users to silence the memory usage messages
with the TFM_MEMORY_USAGE_QUIET config.
Change-Id: Ic346c51d1976dcce1f14aac58bac153026944522
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
diff --git a/toolchain_ARMCLANG.cmake b/toolchain_ARMCLANG.cmake
index 2a97410..dfe5f4b 100644
--- a/toolchain_ARMCLANG.cmake
+++ b/toolchain_ARMCLANG.cmake
@@ -52,11 +52,17 @@
)
endmacro()
+if(TFM_MEMORY_USAGE_QUIET)
+ set(MEMORY_USAGE_FLAG "")
+else()
+ set(MEMORY_USAGE_FLAG --info=summarysizes,sizes,totals,unused,veneers)
+endif()
+
macro(tfm_toolchain_reset_linker_flags)
set_property(DIRECTORY PROPERTY LINK_OPTIONS "")
add_link_options(
- --info=summarysizes,sizes,totals,unused,veneers
+ ${MEMORY_USAGE_FLAG}
--strict
--symbols
--xref