[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual |
Date: |
Wed, 18 Jul 2007 20:44:42 +0200 |
User-agent: |
Mutt/1.5.11 |
As Harald Kipp wrote:
> No idea what __init() is intended to do, but it won't help: No
> initialized stack pointer, no return.
__init() is the name of the routine jumped to from the reset vector.
crtXXX.o provides a default implementation which is marked weak, so
you could overlay it by your own. But in that case, you have to take
care about everything the existing __init() takes care about.
> Using any earlier section than .init3 provides another problem: No
> initialized __zero_reg__, no MCUSR or watchdog clear.
Right, that's exactly the reason why typical user startup stuff better
goes to .init3.
> To avoid overriding the mirror variable, I added an attribute to it.
> u_char mcusr_mirror __attribute__ ((section (".noinit")));
> I'd suggest to add this to the watchdog section of the manual.
Yes, that has been left out by accident. Could you please fill in a
bug report for this, so it won't be forgotten about?
What I don't quite understand, why does it not work for you to have
that code in .init3? After all, .init2 only contains clearing
__zero_reg__, and the initialization of the stack pointer, so I don't
really see why that should get you at risk with the default ~ 15 ms
watchdog timer. (Unless you've got loads of code in .init1, of
course.)
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)
- Re: [avr-libc-dev] New device support, (continued)
Re: [avr-libc-dev] New device support, Dmitry K., 2007/07/15
- Re: [avr-libc-dev] New device support, Bob Paddock, 2007/07/15
- Re: [avr-libc-dev] New device support, Joerg Wunsch, 2007/07/15
- Re: [avr-libc-dev] New device support, Bob Paddock, 2007/07/17
- Re: [avr-libc-dev] New device support, Joerg Wunsch, 2007/07/18
- [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Harald Kipp, 2007/07/18
- Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Harald Kipp, 2007/07/18
- Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual,
Joerg Wunsch <=
- Re: [avr-libc-dev] Hint For Watchdog Disable on Newer AVRs in the Manual, Harald Kipp, 2007/07/19
Re: [avr-libc-dev] New device support, Joerg Wunsch, 2007/07/15