avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [RFC] catching misspeeled signal names


From: Joerg Wunsch
Subject: Re: [avr-libc-dev] [RFC] catching misspeeled signal names
Date: Tue, 20 Apr 2004 09:49:57 +0200
User-agent: Mutt/1.2.5i

As Dmitry K. wrote:

> MOST OF INTERRUPT SERVICE ROUTINES ARE ASSEMBLER ONES.

While I seriously doubt that statement ;-), I agree that asm must not
be broken.  However, that should not be too hard.  In case
__ASSEMBLER__ is set, just revert the macros to the old behaviour.
This doesn't get spelling checks in assembler code, but we didn't used
to have anything before, so it's better than nothing.

The hack is really ugly :), but I've been thinking about the issue
myself, and so far didn't get any better idea.  I'm all for it since
misspelled vector names are one of the major sources of errors that
often remain unnoticed.

The only idea that occurred to me was: how about putting all interrupt
vectors into a section of its own, and then have the linker make check
that all global symbols arriving in that section are of the form
_vector_N?  I assume something like that can be had in the linker.

The major drawback of this besides the requirement to also modify
binutils is that AVR Studio can only handle the standard
.text/.data/.bss sections (at least in COFF files, I don't know about
their ELF effort), so it would not load the interrupt vectors.
Perhaps either the linker or the avr-objcopy performing the COFF
conversion could coerce .text + the vector section into a final .text
section though.

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

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