eRPC: add platform_region_defs to host build
Add the platform_region_defs interface target to the host (eRPC client)
image build as other targets may depend on the region definitions or
flash layout such as the FWU test suite.
During a regular split build it's provided by the spe-CMakeLists.cmake
file but with the eRPC framework it was missing from the host image build.
Change-Id: Ia7b3583ae402a2f01b35405951d40803739d7fc0
Signed-off-by: David Vincze <david.vincze@arm.com>
diff --git a/erpc/tfm_reg_tests/CMakeLists.txt b/erpc/tfm_reg_tests/CMakeLists.txt
index 17e9436..2b02a0c 100644
--- a/erpc/tfm_reg_tests/CMakeLists.txt
+++ b/erpc/tfm_reg_tests/CMakeLists.txt
@@ -105,6 +105,25 @@
)
endif()
+add_library(platform_region_defs INTERFACE)
+
+target_compile_definitions(platform_region_defs
+ INTERFACE
+ $<$<BOOL:${BL1}>:BL1>
+ $<$<BOOL:${BL2}>:BL2>
+ BL2_HEADER_SIZE=${BL2_HEADER_SIZE}
+ BL2_TRAILER_SIZE=${BL2_TRAILER_SIZE}
+ BL1_HEADER_SIZE=${BL1_HEADER_SIZE}
+ BL1_TRAILER_SIZE=${BL1_TRAILER_SIZE}
+ $<$<BOOL:${MCUBOOT_IMAGE_NUMBER}>:MCUBOOT_IMAGE_NUMBER=${MCUBOOT_IMAGE_NUMBER}>
+ $<$<OR:$<CONFIG:Debug>,$<CONFIG:relwithdebinfo>>:ENABLE_HEAP>
+)
+
+target_include_directories(platform_region_defs
+ INTERFACE
+ ${CONFIG_SPE_PATH}/platform/partition
+)
+
################################# Build Tests ##################################
# If config_ns_test.cmake is exported from TF-M build, it indicates regression
# tests are enabled. Otherwise, skip test configuration.