2018-06-04 01:30 AM
Hi.
I'm using keil for programming a stm32 board. In the start up file .s there is a call to __main after the call to SystemInit. Where is the definition of __main? What's the difference between main and __main?Solved! Go to Solution.
2018-06-04 01:37 AM
Hi
IMPORT __main�?
This line refers to the __main in the C library which eventually calls the main() function defined elsewhere in your project.
-Nesrine-
2018-06-04 01:37 AM
Hi
IMPORT __main�?
This line refers to the __main in the C library which eventually calls the main() function defined elsewhere in your project.
-Nesrine-
2018-06-04 01:40 AM
Hello,
main is your main procedure form main.c file, once __main is an internal procedure created by Keil toolchain which is calling at the end your main, but before it is initializing all variables (copying variables from FLASH to proper positions in RAM). In gcc it is seen explicitly, in Keil you can see it within debug process.
Best Regards,
Artur
2018-06-04 02:47 AM
Thank you