Build: Add flag to protect NV counters when testing
Adds an SST_TEST_NV_COUNTERS build flag that enables a virtual
implementation of the SST NV counters interface and disables the
hardware NV counter implementation. This flag is automatically enabled
when running the regression tests to protect the hardware counters from
burn-out.
Change-Id: I7bd66ee45ea865dbf5af236123c4f7ef4391f249
Signed-off-by: Jamie Fox <jamie.fox@arm.com>
diff --git a/CommonConfig.cmake b/CommonConfig.cmake
index 1bbf95a..711b078 100644
--- a/CommonConfig.cmake
+++ b/CommonConfig.cmake
@@ -254,6 +254,14 @@
endif()
endif()
+if (NOT DEFINED SST_TEST_NV_COUNTERS)
+ if (REGRESSION AND (TFM_LVL EQUAL 1))
+ set(SST_TEST_NV_COUNTERS ON)
+ else()
+ set(SST_TEST_NV_COUNTERS OFF)
+ endif()
+endif()
+
if (NOT DEFINED MBEDTLS_DEBUG)
set(MBEDTLS_DEBUG OFF)
endif()