From 656e04611353ccb5725af8b42a8a6581e2ac53dd Mon Sep 17 00:00:00 2001 From: Mark Horvath Date: Mon, 22 Jun 2020 16:36:35 +0200 Subject: [PATCH] Call mbed_tfm_init earlier Change-Id: I0f45425058bf5cabbda877463ff1d8f4d713be8f Signed-off-by: Mark Horvath --- cmsis/device/rtos/include/mbed_boot.h | 3 ++- cmsis/device/rtos/source/mbed_boot.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmsis/device/rtos/include/mbed_boot.h b/cmsis/device/rtos/include/mbed_boot.h index 219168b2cfc..547d384f1e2 100644 --- a/cmsis/device/rtos/include/mbed_boot.h +++ b/cmsis/device/rtos/include/mbed_boot.h @@ -134,6 +134,8 @@ MBED_NORETURN void mbed_rtos_start(void); * * Preconditions: * - The RTOS has been started by a call to mbed_rtos_start + * - If the platform is supported by TF-M, initialization + * has been done by a call to mbed_tfm_init */ void mbed_toolchain_init(void); @@ -160,7 +162,6 @@ void mbed_sdk_init(void); * * Preconditions: * - The RTOS has been started by a call to mbed_rtos_start - * - The toolchain has been initialized by a call to mbed_toolchain_init */ void mbed_tfm_init(void); diff --git a/cmsis/device/rtos/source/mbed_boot.c b/cmsis/device/rtos/source/mbed_boot.c index 495a5ee9a06..dcaf7fdb23d 100644 --- a/cmsis/device/rtos/source/mbed_boot.c +++ b/cmsis/device/rtos/source/mbed_boot.c @@ -95,8 +95,8 @@ void mbed_init(void) void mbed_start(void) { mbed_rtos_init_singleton_mutex(); - mbed_toolchain_init(); mbed_tfm_init(); + mbed_toolchain_init(); mbed_main(); mbed_error_initialize(); main();