Dmitry wrote:

what is the C-prologue?

Everything in the __reset_vector (WDT stop, initialisation of global variables / heap if needed... ).


How __reset_vector can be computed?
Allocated? Linked?

The

return 1;

in __low_level_init is a

MOV     #1,R12

After RET (back into __reset_vector) R12 is tested if 1 or 0:

CMP     #0,R12
JEQ     main            ;return 0; -> skip C prologue
        ;else (return 1;) -> compute C prologue


Therefor, if "return 0;" is chosen __reset_vector exists (is linked), but is not used. -> Unnessecary code, but flexibility for the user to decide, if __reset_vector should be computed or not with only writing a "return 1;" oder "return 0;".


Just look at any program compiled with IAR's (demo) compiler and you will see this machnism.


But as I said: This information is additional - it is not my basic problem. ;-)

Ralf


Reply via email to