This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: Commit: MSP430: crt0: Remove watchdog disabling code
- From: Friedrich Lobenstock <fl-newlib at lsl dot at>
- To: newlib at sourceware dot org
- Date: Fri, 4 Sep 2015 18:34:38 +0200
- Subject: Re: Commit: MSP430: crt0: Remove watchdog disabling code
- Authentication-results: sourceware.org; auth=none
- References: <87zj1mhr1q dot fsf at redhat dot com>
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