From 1eb16d1f250fc616ac9d62c96143b099582bb249 Mon Sep 17 00:00:00 2001 From: jeromecoutant Date: Wed, 17 Feb 2021 17:53:26 +0100 Subject: [PATCH] STM32 : gpio_reset_at_init disabled with MBED_DEBUG --- targets/TARGET_STM/mbed_overrides.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/targets/TARGET_STM/mbed_overrides.c b/targets/TARGET_STM/mbed_overrides.c index 76b836af19..da3f7f84f6 100644 --- a/targets/TARGET_STM/mbed_overrides.c +++ b/targets/TARGET_STM/mbed_overrides.c @@ -94,6 +94,7 @@ MBED_WEAK void TargetBSP_Init(void) { /** Do nothing */ } +#ifndef MBED_DEBUG #if MBED_CONF_TARGET_GPIO_RESET_AT_INIT void GPIO_Full_Init(void) { GPIO_InitTypeDef GPIO_InitStruct; @@ -162,6 +163,7 @@ void GPIO_Full_Init(void) { #endif } #endif +#endif // This function is called after RAM initialization and before main. void mbed_sdk_init() @@ -313,9 +315,11 @@ void mbed_sdk_init() #endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */ #endif /* DEVICE_RTC */ +#ifndef MBED_DEBUG #if MBED_CONF_TARGET_GPIO_RESET_AT_INIT /* Reset all GPIO */ GPIO_Full_Init(); +#endif #endif /* BSP initialization hook (external RAM, etc) */