mbed-os/rtos/rtx
Laurent MEUNIER 3a61bd025f INIT:ARM + rtos: Align pre-main initialization steps between TCs
Various toolchains supported in MBED don't followthe same initialization
steps. This can have impacts on platform behavior.

For STM32, it is needed to call the HAL_Init() _after_ the  RAM has been
initialized (sdata from flash / zero initialized data) and _before_ the C++
objects are being created, especially if those objects require support
of tickers for instance.

In GCC and IAR, this was done in previous commit to avoid HAL_Init()
to be called twice.

In ARM this there is no hook defined in MBED yet to place the call.
The proposal is to take benefit of the library's
_platform_post_stackheap_init function that is going to be called before
__rt_lib_init where the C++ object init is done (__cpp_initialize__aeabi_)

In case of mbed with rtos, the __rt_entry is redefined so we need to add
the call to _platform_post_stackheap_init.

This series should solve issue reported here:
STM32 (At least F401) breaks if Tickers are activated in a global object #2115
2016-10-04 14:55:28 -05:00
..
TARGET_ARM7 RTOS - Move per-target RTX config to mbed_rtx.h 2016-09-22 15:09:49 +08:00
TARGET_CORTEX_A Merge pull request #2805 from RobMeades/master 2016-09-25 22:20:29 -05:00
TARGET_CORTEX_M INIT:ARM + rtos: Align pre-main initialization steps between TCs 2016-10-04 14:55:28 -05:00