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_GNUARM.cmake b/toolchain_GNUARM.cmake
index 654d5bb..915410a 100644
--- a/toolchain_GNUARM.cmake
+++ b/toolchain_GNUARM.cmake
@@ -52,6 +52,12 @@
)
endmacro()
+if(TFM_MEMORY_USAGE_QUIET)
+ set(MEMORY_USAGE_FLAG "")
+else()
+ set(MEMORY_USAGE_FLAG LINKER:--print-memory-usage)
+endif()
+
macro(tfm_toolchain_reset_linker_flags)
set_property(DIRECTORY PROPERTY LINK_OPTIONS "")
@@ -62,7 +68,7 @@
LINKER:-fatal-warnings
LINKER:--gc-sections
LINKER:--no-wchar-size-warning
- LINKER:--print-memory-usage
+ ${MEMORY_USAGE_FLAG}
)
endmacro()