Skip to content

Commit 75fb93c

Browse files
committed
STM32 mbed_sdk_init update for easy maintenance
1 parent 2496f1d commit 75fb93c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

targets/TARGET_STM/mbed_overrides.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int mbed_sdk_inited = 0;
3232
// This function is called after RAM initialization and before main.
3333
void mbed_sdk_init()
3434
{
35-
#if TARGET_STM32F7
35+
#if defined(__ICACHE_PRESENT) /* STM32F7 */
3636
// The mbed_sdk_init can be called either during cold boot or during
3737
// application boot after bootloader has been executed.
3838
// In case the bootloader has already enabled the cache,
@@ -43,7 +43,7 @@ void mbed_sdk_init()
4343
if ((SCB->CCR & (uint32_t)SCB_CCR_DC_Msk) == 0) { // If DCache is disabled
4444
SCB_EnableDCache();
4545
}
46-
#endif /* TARGET_STM32F7 */
46+
#endif /* __ICACHE_PRESENT */
4747

4848
// Update the SystemCoreClock variable.
4949
SystemCoreClockUpdate();

0 commit comments

Comments
 (0)