The gcc documentation will not help you. The C startup files are provided by newlib, which doesn't really document anything of the architecture-specific code. To insert your own code into the startup code, put it into the appropriate .crt_xxxx section (look at crt0.S for details): static void __attribute__((naked, section(".crt_0042"), used)) disable_watchdog (void) { WDTCTL = WDTPW | WDTHOLD; }
↧