cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L433R : unable to find __iar_program_start

hardik
Associate II
Posted on September 01, 2017 at 07:35

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 R0

My 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-l4
3 REPLIES 3
Posted on September 01, 2017 at 10:20

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

0690X000006086BQAQ.png

SystemInit is the function inside system_stm32xxx.c responsible to initialize the clocks etc

Posted on September 01, 2017 at 10:24

Hi, 

I understand that. I want to know the file/library where the function is contained. 

Posted on September 01, 2017 at 10:48

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.