From 4a690721616a39e51290079b5489fa07970d423b Mon Sep 17 00:00:00 2001 From: Michel Jaouen Date: Fri, 7 Oct 2016 09:24:23 +0200 Subject: [PATCH] INIT:GCC add call to HAL_Init system_init, stops all on going timer. gcc _start , perform zero initialized. => HAL_Init must be done again also in GCC toolchain --- targets/TARGET_STM/TARGET_STM32F0/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32F1/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32F3/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32F4/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32F7/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32L0/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32L1/mbed_overrides.c | 2 -- targets/TARGET_STM/TARGET_STM32L4/mbed_overrides.c | 2 -- 8 files changed, 16 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32F0/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32F0/mbed_overrides.c index a14c2980e1..4d38778914 100644 --- a/targets/TARGET_STM/TARGET_STM32F0/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32F0/mbed_overrides.c @@ -31,8 +31,6 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif } diff --git a/targets/TARGET_STM/TARGET_STM32F1/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32F1/mbed_overrides.c index 2252f1c824..9783dd90a5 100644 --- a/targets/TARGET_STM/TARGET_STM32F1/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32F1/mbed_overrides.c @@ -32,8 +32,6 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif } diff --git a/targets/TARGET_STM/TARGET_STM32F3/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32F3/mbed_overrides.c index 2252f1c824..9783dd90a5 100644 --- a/targets/TARGET_STM/TARGET_STM32F3/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32F3/mbed_overrides.c @@ -32,8 +32,6 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif } diff --git a/targets/TARGET_STM/TARGET_STM32F4/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32F4/mbed_overrides.c index 93e4da780b..a21a749f80 100644 --- a/targets/TARGET_STM/TARGET_STM32F4/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32F4/mbed_overrides.c @@ -33,10 +33,8 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif } /** diff --git a/targets/TARGET_STM/TARGET_STM32F7/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32F7/mbed_overrides.c index 6b174b8980..496c4adc66 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32F7/mbed_overrides.c @@ -35,10 +35,8 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif } diff --git a/targets/TARGET_STM/TARGET_STM32L0/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32L0/mbed_overrides.c index 4025d0aaa0..4c3ff4c6c9 100644 --- a/targets/TARGET_STM/TARGET_STM32L0/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32L0/mbed_overrides.c @@ -32,8 +32,6 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif } diff --git a/targets/TARGET_STM/TARGET_STM32L1/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32L1/mbed_overrides.c index 9b9c85031f..16d77cc84c 100644 --- a/targets/TARGET_STM/TARGET_STM32L1/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32L1/mbed_overrides.c @@ -35,10 +35,8 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif #if defined(TARGET_XDOT_L151CC) if (PWR->CSR & PWR_CSR_SBF) { diff --git a/targets/TARGET_STM/TARGET_STM32L4/mbed_overrides.c b/targets/TARGET_STM/TARGET_STM32L4/mbed_overrides.c index 4025d0aaa0..4c3ff4c6c9 100644 --- a/targets/TARGET_STM/TARGET_STM32L4/mbed_overrides.c +++ b/targets/TARGET_STM/TARGET_STM32L4/mbed_overrides.c @@ -32,8 +32,6 @@ void mbed_sdk_init() { // Update the SystemCoreClock variable. SystemCoreClockUpdate(); -#if !defined(TOOLCHAIN_GCC_ARM) // Need to restart HAL driver after the RAM is initialized HAL_Init(); -#endif }