Platform Entry -> main()
The Final Step — 3 Function Calls at 0x10000186
platform_entry Assembly
0x10000186
ldr r1, [DAT]
-> load runtime_init addr
0x10000188
blx r1
-> call runtime_init()
0x1000018C
blx r1
-> call main()
0x10000190
blx r1
-> call exit()
Call Sequence
runtime_init()
SDK setup
->
main()
YOUR CODE
->
exit()
cleanup
runtime_init()
Initializes SDK systems:
• Clock configuration
• GPIO setup
• C++ constructor calls
• Peripheral initialization
After main() Returns
exit() handles cleanup.
Then:
bkpt 0x0000
<- infinite halt
Should never be reached!