Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: MSP430 GCC execute custom code just before any bss_init o similar

$
0
0
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; }

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>