I'm trying to undestand the early stages after a power on in a
STM32F411-DISCO ( Arm Cortex-M4 ).
Immediatly after a reset ( or power on ) the program counter is
setting at 0x00000004 and called "Reset_Handler"
This function is in 'micropython/ports/stm32/resethandler.s'
Code: Select all
...
... At the end ...
/* Initialise the system and jump to the main code */
bl SystemInit
mov r0, r4
b stm32_main
Question_1
Where is this function?
I saw only a comment in 'micropython/ports/stm32/system_stm32.c'
but no implementation.
Code: Select all
* This file provides two functions and one global variable to be called from
* user application:
* - SystemInit(): This function is called at startup just after reset and
* before branch to main program. This call is made inside
* the "startup_stm32.s" file.
*
* - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
* by the user application to setup the SysTick
* timer or configure other parameters.
*
Then we have to jump (without return ) to "stm32_main":
'ports/stm32/mboot/main.c' or 'ports/stm32/main.c' ?
Which one ?