Commit: MSP430: crt0: Remove watchdog disabling code
Friedrich Lobenstock
fl-newlib@lsl.at
Fri Sep 4 17:14:00 GMT 2015
Hi Nick!
Nick Clifton wrote on 2015-08-20 18:18 MET:
> #include <msp430.h>
>
> static void __attribute__((naked, section(".crt_0042"), used))
> disable_watchdog (void)
> {
> WDTCTL =3D WDTPW | WDTHOLD;
> }
I'd rather recommend the following:
#include <msp430.h>
static void __attribute__((naked, section(".crt_0001disable_watchdog"), used))
disable_watchdog (void)
{
WDTCTL = WDTPW | WDTHOLD;
}
The section you're removing the watchdog disabling code from is
contained in section ".crt_0000start".
Therefore the section ".crt_0001disable_watchdog" in the code above
resembles the current situation.
--
MfG / Regards
Friedl
More information about the Newlib
mailing list