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

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

[avr-gcc-list] Unable to install interrupt vector for attiny2313


From: choo kok seng
Subject: [avr-gcc-list] Unable to install interrupt vector for attiny2313
Date: Tue, 27 Sep 2005 10:08:38 +0800

 
Dear All,
       I tried to compile a simple code using SIGNAL API for Attiny2313 target, but I always hit the following warning:
main.c:14: warning: `SIG_OVERFLOW1' appears to be a misspelled signal handler
 
The full message is as follow:
avr-gcc (GCC) 3.4.3
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: main.c
avr-gcc -c -mmcu=attiny2313 -I. -gdwarf-2 -DF_CPU=1000000UL -I../../../../Apps/WinAVR/avr/include  -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.lst  -std=gnu99 -MD -MP -MF .dep/main.o.d main.c -o main.o
 
main.c:14: warning: `SIG_OVERFLOW1' appears to be a misspelled signal handler
 
Linking: main.elf
avr-gcc -mmcu=attiny2313 -I. -gdwarf-2 -DF_CPU=1000000UL -I../../../../Apps/WinAVR/avr/include  -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=main.o  -std=gnu99 -MD -MP -MF .dep/main.elf.d main.o --output main.elf -Wl,-Map=main.map,--cref    -lm
 
 
I am using latest version of winavr from
The interrupt handler is as follow :
SIGNAL ( SIG_OVERFLOW1 )
{
 
 //set PORTB.2 low
 PORTB ^= 0x1;
 
    // reload counter
    TCNT1 = 0xffff - 1000;
 
    /* enable interrupts */
    sei ();
}
 
The assembler listing is as follow:
00000000 <__vectors>:
   0: 12 c0        rjmp .+36      ; 0x26
   2: 2a c0        rjmp .+84      ; 0x58
   4: 29 c0        rjmp .+82      ; 0x58
   6: 28 c0        rjmp .+80      ; 0x58
   8: 27 c0        rjmp .+78      ; 0x58
   a: 26 c0        rjmp .+76      ; 0x58
   c: 25 c0        rjmp .+74      ; 0x58
   e: 24 c0        rjmp .+72      ; 0x58
  10: 23 c0        rjmp .+70      ; 0x58
  12: 22 c0        rjmp .+68      ; 0x58
  14: 21 c0        rjmp .+66      ; 0x58
  16: 20 c0        rjmp .+64      ; 0x58
  18: 1f c0        rjmp .+62      ; 0x58
  1a: 1e c0        rjmp .+60      ; 0x58
  1c: 1d c0        rjmp .+58      ; 0x58
  1e: 1c c0        rjmp .+56      ; 0x58
  20: 1b c0        rjmp .+54      ; 0x58
  22: 1a c0        rjmp .+52      ; 0x58
  24: 19 c0        rjmp .+50      ; 0x58
 
 
Apparently, the interrupt handler is not installed. The same code compiled and worked properly for Atmega8. Please advise on how to get the interrupt to work for attiny2313.
 
Thanks in advance.
 
regards
kchoo
 
 

reply via email to

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