Re: [avr-gcc-list] source code of crtm48.o

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

 



On Thu, Jul 22, 2004 at 11:53:04AM +0200, Massimiliano Cialdi wrote:
> I need to change vector table and entry point. Where can I find source
> code of crtm48.o (or other crtmxx.o)?
> How can I change vectors?

Massimiliano,

Your question has interesting ramifications. The avr-libc doco states
"In the AVR-GCC environment, the vector table is predefined to point to
interrupt routines with predetermined names."

In C then, it should simply be a matter of supplying suitably named
ISRs. (See avr-libc doco) If your dilemma arises from the use of one or
more assembler ISRs, then the same method ought apply. The linker should
find the symbol definition satisfied by your assembler ISR.

How avr-libc avoids unsatisfied externals, resulting from the shotgun
vector table approach, is not immediately clear. I find .e.g. in
/usr/local/avr/avr/include/avr/iom64.h:

#define SIG_INTERRUPT0          _VECTOR(1)
...
#define SIG_SPM_READY           _VECTOR(34)

For assembler ISRs, it appears to be " a name like __vector_N should
appear, with N being a small integer number." 

A trial build should show a handler for ISRs not "installed", at
"__vector_default", if I've understood the doco correctly. How that
would avoid competing for an interrupt that you wish to handle in
assembler, is not quite clear to me yet, since I haven't tried it.

Incidentally, did you sort out the overlap problem mentioned in the
other post?

HTH,
Erik

   

   

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux