I opened a startup code (startup_tm4c123.s).. i didn't find any code about coping the initialized variables from ROM to RAM. How can Keil copy them at start ?
That happens inside the Keil runtime support stuff.
http://www.keil.com/support/man/docs/gsac/gsac_strtupcodearm7.htm
I think the last item there is actually wrong:
"8. Transfers control to the main C function."
The startup code transfers control to the C Runtime which eventually transfers control to the main C function.
I didn't understand what you really mean about c runtime .. Where can i find this part of code on Keil ??? I
This is standard 'C' stuff - nothing specifically to do with Keil
en.wikipedia.org/.../Runtime_library
en.wikipedia.org/.../Crt0
The __main code called in startup.s initializes the statics before calling your main() function. __main != main
This is part of the library the linker pulls in, and the linker can also compress this initialization data.
It's pretty helpful .. thanks everyone so much