mirror of https://github.com/ARMmbed/mbed-os.git
STM32: add weak TargetBSP_Init function
parent
c7759fe505
commit
76135d0820
|
@ -139,20 +139,6 @@ const uint8_t D1CorePrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7,
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Setup the target board-specific configuration
|
|
||||||
* of the microcontroller
|
|
||||||
*
|
|
||||||
* @note If used, this function should be implemented
|
|
||||||
* elsewhere. This declaration is weak so it may be overridden
|
|
||||||
* by user code.
|
|
||||||
*
|
|
||||||
* @param None
|
|
||||||
* @retval None
|
|
||||||
*/
|
|
||||||
__weak void TargetBSP_Init(void) {
|
|
||||||
/** Do nothing */
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Setup the microcontroller system
|
* @brief Setup the microcontroller system
|
||||||
|
@ -232,9 +218,6 @@ void SystemInit(void)
|
||||||
|
|
||||||
#endif /* CORE_CM7*/
|
#endif /* CORE_CM7*/
|
||||||
|
|
||||||
/* BSP initialization hook (external RAM, etc) */
|
|
||||||
TargetBSP_Init();
|
|
||||||
|
|
||||||
#ifdef CORE_CM4
|
#ifdef CORE_CM4
|
||||||
|
|
||||||
/* Configure the Vector Table location add offset address ------------------*/
|
/* Configure the Vector Table location add offset address ------------------*/
|
||||||
|
|
|
@ -31,6 +31,22 @@
|
||||||
int mbed_sdk_inited = 0;
|
int mbed_sdk_inited = 0;
|
||||||
extern void SetSysClock(void);
|
extern void SetSysClock(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Setup the target board-specific configuration
|
||||||
|
* of the microcontroller
|
||||||
|
*
|
||||||
|
* @note If used, this function should be implemented
|
||||||
|
* elsewhere. This declaration is weak so it may be overridden
|
||||||
|
* by user code.
|
||||||
|
*
|
||||||
|
* @param None
|
||||||
|
* @retval None
|
||||||
|
*/
|
||||||
|
MBED_WEAK void TargetBSP_Init(void) {
|
||||||
|
/** Do nothing */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// This function is called after RAM initialization and before main.
|
// This function is called after RAM initialization and before main.
|
||||||
void mbed_sdk_init()
|
void mbed_sdk_init()
|
||||||
{
|
{
|
||||||
|
@ -150,5 +166,8 @@ void mbed_sdk_init()
|
||||||
#endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */
|
#endif /* ! MBED_CONF_TARGET_LSE_AVAILABLE */
|
||||||
#endif /* DEVICE_RTC */
|
#endif /* DEVICE_RTC */
|
||||||
|
|
||||||
|
/* BSP initialization hook (external RAM, etc) */
|
||||||
|
TargetBSP_Init();
|
||||||
|
|
||||||
mbed_sdk_inited = 1;
|
mbed_sdk_inited = 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue