From fe2646d18394439cebcae903f28d8a6fbd80802a Mon Sep 17 00:00:00 2001 From: Deepika Date: Fri, 18 Aug 2017 16:37:38 -0500 Subject: [PATCH] Added new locking init requirement for v8.x The application must call void __iar_Initlocks(void); before any lock is used. --- rtos/TARGET_CORTEX/mbed_boot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rtos/TARGET_CORTEX/mbed_boot.c b/rtos/TARGET_CORTEX/mbed_boot.c index 266dce37cd..c2d1042278 100644 --- a/rtos/TARGET_CORTEX/mbed_boot.c +++ b/rtos/TARGET_CORTEX/mbed_boot.c @@ -576,9 +576,14 @@ void pre_main(void) singleton_mutex_attr.cb_mem = &singleton_mutex_obj; singleton_mutex_id = osMutexNew(&singleton_mutex_attr); +#if (__IAR_SYSTEMS_ICC__ >= 8) + __iar_Initlocks(); +#endif + if (low_level_init_needed) { __iar_dynamic_initialization(); } + mbed_main(); main(); }