From 2a65eacac356c460c337bf8549d0d2a54d6c782f Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Fri, 23 Nov 2018 18:04:08 +0100 Subject: [PATCH] STM32 mbed_sdk_init update for easy maintenance --- targets/TARGET_STM/mbed_overrides.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/targets/TARGET_STM/mbed_overrides.c b/targets/TARGET_STM/mbed_overrides.c index 4166cef34e..71c61a28c2 100644 --- a/targets/TARGET_STM/mbed_overrides.c +++ b/targets/TARGET_STM/mbed_overrides.c @@ -32,7 +32,7 @@ int mbed_sdk_inited = 0; // This function is called after RAM initialization and before main. void mbed_sdk_init() { -#if TARGET_STM32F7 +#if defined(__ICACHE_PRESENT) /* STM32F7 */ // The mbed_sdk_init can be called either during cold boot or during // application boot after bootloader has been executed. // In case the bootloader has already enabled the cache, @@ -43,7 +43,7 @@ void mbed_sdk_init() if ((SCB->CCR & (uint32_t)SCB_CCR_DC_Msk) == 0) { // If DCache is disabled SCB_EnableDCache(); } -#endif /* TARGET_STM32F7 */ +#endif /* __ICACHE_PRESENT */ // Update the SystemCoreClock variable. SystemCoreClockUpdate();