mirror of
https://github.com/mitxela/clock4.git
synced 2025-12-05 23:20:26 -08:00
fwd protect stack when jumping to system loader
can't be too careful eh
This commit is contained in:
@@ -315,7 +315,7 @@ static void MX_TIM21_Init(void);
|
|||||||
/* Private user code ---------------------------------------------------------*/
|
/* Private user code ---------------------------------------------------------*/
|
||||||
/* USER CODE BEGIN 0 */
|
/* USER CODE BEGIN 0 */
|
||||||
|
|
||||||
|
__attribute__((naked,noreturn))
|
||||||
void triggerBootloader(void){
|
void triggerBootloader(void){
|
||||||
|
|
||||||
|
|
||||||
@@ -351,6 +351,7 @@ void triggerBootloader(void){
|
|||||||
__set_MSP(*(volatile uint32_t*) SYSMEM);
|
__set_MSP(*(volatile uint32_t*) SYSMEM);
|
||||||
((void (*)(void)) (*((volatile uint32_t *)(SYSMEM + 4))))();
|
((void (*)(void)) (*((volatile uint32_t *)(SYSMEM + 4))))();
|
||||||
|
|
||||||
|
__builtin_unreachable();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user