As Weddington, Eric wrote: > Regarding the discussion: First, is it an error to not have a > handler for an enabled interrupt? I would think yes.
I agree. > If the default is just to return, then I would agree that that does > not really let the user know of the error. It can get too easily > lost. The symptoms would just be reduced performance. In other situations (missing USART interrupt handler), it would enter an infinite loop only anyway. There's once been a suggestion from Peter Dannegger in the German-language www.mikrocontroller.net forum... Ah, yes, his suggestion was to *call* (rather than jump) to the default handler, and then POP r31 POP r30 there so the return address can be monitored by a debugger. One of the biggest questions with the current implementation is that you're suddenly faced with: ``Hmm, my program seems to reset the controller, probably a stray interrupt, but heck, *what* interrupt is it?'' > Would it be better to have the default call exit(1)? Does the default > implementation of exit go into an infinite loop? It does, but I'd prefer calling (or jumping to) abort() instead. It's also an infinite loop by default but it's the intended fault exit point. I think both, exit() and abort() should disable interrupts before running into the loop. Opinions on that? If we agree, it would be a feature that either has to go into 1.6.0 still, or it will be delayed until 1.8.x because it's a non backwards-compatible change. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) _______________________________________________ AVR-libc-dev mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/avr-libc-dev
