stm32/mboot: Add MBOOT_BOARD_ENTRY_INIT for a board to add entry code.
Also change the signature of stm32_main to uint32_t, which is what it should be. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
b8d55d4c52
commit
4f918f4b26
|
@ -1439,7 +1439,7 @@ static void leave_bootloader(void) {
|
|||
extern PCD_HandleTypeDef pcd_fs_handle;
|
||||
extern PCD_HandleTypeDef pcd_hs_handle;
|
||||
|
||||
void stm32_main(int initial_r0) {
|
||||
void stm32_main(uint32_t initial_r0) {
|
||||
#if defined(STM32H7)
|
||||
// Configure write-once power options, and wait for voltage levels to be ready
|
||||
PWR->CR3 = PWR_CR3_LDOEN;
|
||||
|
@ -1524,6 +1524,10 @@ enter_bootloader:
|
|||
__ASM volatile ("msr basepri_max, %0" : : "r" (pri) : "memory");
|
||||
#endif
|
||||
|
||||
#if defined(MBOOT_BOARD_ENTRY_INIT)
|
||||
MBOOT_BOARD_ENTRY_INIT(initial_r0);
|
||||
#endif
|
||||
|
||||
#if defined(MBOOT_SPIFLASH_ADDR)
|
||||
MBOOT_SPIFLASH_SPIFLASH->config = MBOOT_SPIFLASH_CONFIG;
|
||||
mp_spiflash_init(MBOOT_SPIFLASH_SPIFLASH);
|
||||
|
|
Loading…
Reference in New Issue