Skip to content

Commit ecaa5fe

Browse files
committed
Add BSP initialization hook to system initialization code
1 parent decc6d3 commit ecaa5fe

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

targets/TARGET_STM/TARGET_STM32H7/TARGET_STM32H745xI/system_stm32h7xx.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@ const uint8_t D1CorePrescTable[16] = {0, 0, 0, 0, 1, 2, 3, 4, 1, 2, 3, 4, 6, 7,
139139
* @{
140140
*/
141141

142+
/**
143+
* @brief Setup the target board-specific configuration
144+
* of the microcontroller
145+
*
146+
* @note If used, this function should be implemented
147+
* elsewhere. This declaration is weak so it may be overridden
148+
* by user code.
149+
*
150+
* @param None
151+
* @retval None
152+
*/
153+
__weak void TargetBSP_Init(void) {
154+
/** Do nothing */
155+
}
156+
142157
/**
143158
* @brief Setup the microcontroller system
144159
* Initialize the FPU setting and vector table location
@@ -217,6 +232,9 @@ void SystemInit(void)
217232

218233
#endif /* CORE_CM7*/
219234

235+
/* BSP initialization hook (external RAM, etc) */
236+
TargetBSP_Init();
237+
220238
#ifdef CORE_CM4
221239

222240
/* Configure the Vector Table location add offset address ------------------*/

0 commit comments

Comments
 (0)