Build: Improve the setting of number of mailbox queue slots
Move configuration of number of mailbox queue slots from platform's
device_cfg.h into a common header file tfm_mailbox_config.h.
tfm_mailbox_config.h is automatically generated during build. The
value of NUM_MAILBOX_QUEUE_SLOT is passed from build configuration
and then set in tfm_mailbox_config.h.
Change-Id: I9a3ac465b71b316accf6cd41cea80745eec8607c
Signed-off-by: David Hu <david.hu@arm.com>
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index 0351754..188e651 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -61,3 +61,12 @@
$<$<BOOL:${TFM_PSA_API}>:${CMAKE_CURRENT_SOURCE_DIR}/src/psa/psa_lifecycle.c>
${CMAKE_CURRENT_SOURCE_DIR}/src/log/tfm_log_raw.c
)
+
+###################### Export configurations to NS #############################
+
+if (TFM_MULTI_CORE_TOPOLOGY OR FORWARD_PROT_MSG)
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/multi_core/tfm_mailbox_config.h.in
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/multi_core/tfm_mailbox_config.h
+ NEWLINE_STYLE UNIX
+ )
+endif()