[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] ??Upgrade from 2005 to 2006 of WinAvr breaks ISR(_vec
From: |
Steve Franks |
Subject: |
Re: [avr-libc-dev] ??Upgrade from 2005 to 2006 of WinAvr breaks ISR(_vector_default)?? |
Date: |
Sat, 22 Apr 2006 10:17:41 -0700 |
>
> > I get the following warning:
> >
> > main.cpp:92: warning: `_Z16__vector_defaultv' appears to be a
> > misspelled
> > signal handler
> >
> > When I try to compile:
> >
> > ISR(__vector_default) { puts("\nUI"); }
> >
> > On a Mega168. I changed "SIGNAL" to "ISR", and changed #include
> > "avr/signal.h" to "avr/interrupt.h"
>
> Are you doing
>
> extern "C" {
> #include <avr/interrupt.h>
> }
>
>
> for the include?
>
> --
> Ned Konz
> address@hidden
Ah, Ned, you nailed it, almost. "extern C" around the include is not the
solution, but putting it around the ISR is! See below:
extern "C" {
ISR(__vector_default) { puts("\nUI"); }
}
Is this the type of thing that one should do a avr-libc bug entry for?
Obviously not alot of C++ hackers out there.
Thanks for the leg-up,
Steve
--
Steve Franks, KE7BTE
Staff Engineer
Franks Development, LLC
http://www.franks-development.com
(520) 312-0089