avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] RE: Class Interrupts


From: Ron Kreymborg
Subject: [avr-gcc-list] RE: Class Interrupts
Date: Mon, 24 Mar 2008 00:53:01 +1100

> As Ron Kreymborg wrote:
> 
> > I have had a look at the avr.c file and a fairly simple fix that
bypasses
> > the warning in avr_handle_fndecl_attribute is to add another attribute
to
> > the avr_attribute_table with identical parameters to "signal". For want
of
> > something better I used "cppsignal".
> 
> Well, that would be one option, and a relatively easy one.
> 
> However, what I'd really like to look at again (and maybe you're
> interested in it as well?) is the reference one of our Russian fellows
> (I think it's been Dmitry Xmelkov) was citing.  There has once been a
> suggestion made by Marek Michalkiewicz how to get rid of that warning
> alltogether.  It requires a completely different interrupt vector
> implementation but has the benefit of being able to arbitrarily name
> the interrupt vectors, which IMHO should also cover your case.
> 
> After all, the existing warning is just a stop-gap measure since by
> that time, too many people have been stumbling across misspelled ISRs
> without even noticing it.
> 
> --
> cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

I looked for this suggestion on the web but found nothing that looked
promising. 

In C++ using "asm" does directly link an arbitrary name to the given vector,
so that is the partial solution I am using. However, in C++ the spell check
is on the mangled arbitrary name, rather than the vector, and while the
compiler will pick up a spelling error in the former, it won't in the
latter. So for this latter case the compile looks good but there is no jump
link, presumably the reason for the spelling check in the first place. The
"asm" technique fails in C as the spell check rejects the arbitrary name and
this kills the declaration.

So a method that does away with the __vector_XX construct to produce the
jump to an arbitrary name would be very welcome, as the compiler could then
detect any spelling error. Darned if I can see how it could be done though.

I am happy to pursue this but would appreciate a few more clues.

Ron






reply via email to

[Prev in Thread] Current Thread [Next in Thread]