diff --git a/components/TARGET_PSA/TARGET_TFM/COMPONENT_NSPE/interface/src/tfm_ns_lock_rtx.c b/components/TARGET_PSA/TARGET_TFM/COMPONENT_NSPE/interface/src/tfm_ns_lock_rtx.c index ef6cfe0f92..76b284efff 100644 --- a/components/TARGET_PSA/TARGET_TFM/COMPONENT_NSPE/interface/src/tfm_ns_lock_rtx.c +++ b/components/TARGET_PSA/TARGET_TFM/COMPONENT_NSPE/interface/src/tfm_ns_lock_rtx.c @@ -8,6 +8,7 @@ #include #include "cmsis.h" +#include "rtx_os.h" #include "cmsis_os2.h" #include "tfm_api.h" @@ -30,9 +31,14 @@ static struct ns_lock_state ns_lock = {.init=false, .id=NULL}; /** * \brief Mutex properties, NS lock */ + +static osRtxMutex_t ns_lock_cb = { 0 }; + static const osMutexAttr_t ns_lock_attrib = { .name = "ns_lock", - .attr_bits = osMutexPrioInherit + .attr_bits = osMutexPrioInherit, + .cb_mem = &ns_lock_cb, + .cb_size = sizeof(ns_lock_cb) }; /**