2017-08-31 10:35 PM
Hi,
I am trying to figure out the initialization sequence for STM32L433R.
In startup_stm32l433xx.s: i see that the vector table first initializes the current stack pointer.
After that it runs Reset_Handler. The Reset_Handler in turn loads SystemInit and then __iar_program_start.
Reset_Handler
LDR R0, =SystemInit BLX R0 LDR R0, =__iar_program_start BX R0My understanding says that __iar_program_start in turn will call main() function. Something like this :
void __iar_program_start(void)
{
main();
}
I am not able to figure out where are these two functions located.
In IAR i did Ctrl+Shift+F and tried to search for both this functions. But i can't see there definitions anywhere.
Can someone please point me to the right files?
#stm32 #stm32-l42017-09-01 01:20 AM
Hello!
This call to __iar_program_start is for initialize the C runtime libraries used by IAR and needed for program . This function contained in a library.
After initialization calls the main function.
You can bypass this function by specifying your own entry symbol. like the picture
SystemInit is the function inside system_stm32xxx.c responsible to initialize the clocks etc
2017-09-01 03:24 AM
Hi,
I understand that. I want to know the file/library where the function is contained.
2017-09-01 03:48 AM
As the name suggests, it is IAR specific.
You can check your project for linked libs, and scan them.
Or check the documentation/tutorials.
Or, finally ask IAR ...
Don't have any IAR-WB installation currently.