[Top][All Lists]

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

[avr-gcc-list] avr-gcc warning about SIGNAL(SIG_USB_HW)

From: Dean Hall
Subject: [avr-gcc-list] avr-gcc warning about SIGNAL(SIG_USB_HW)
Date: Thu, 27 Oct 2005 23:16:56 -0500


Below is a test program that exhibits two issues I'm having. #1 is just a notice, maybe a bug? Workaround recommendations for #2 are appreciated:

1) I compile the same source code with the same makefile on two different OSs. The result is I get a "misspelled signal handler" warning on Win98 but not on Mac OS X 10.4. Same results when using SIGNAL() or INTERRUPT(). Both avr-gcc compilers are version 3.4.3. The one on Win98 is from the WinAvr dist. The one on Mac was built from source. The only compiler differences I can see is that Win98 was configured with "--enable-languages=c,c++" whereas with Mac it is just "--enable-languages=c".

2) Results of compiling on both OSs is this: the vector table (as seen in __vectors in the objdump) has the USB_HW vector set to default; not to my ISR.

Here's the command line and warning:
avr-gcc -c -mmcu=at43usb355 -I. -gstabs -D__AVR_AT43USB355__ - DF_CPU=6000000UL -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums - Wall -Wstr ict-prototypes -Wa,-adhlns=isr_test.lst -std=gnu99 -MD -MP -MF .dep/ isr_test.o.
d isr_test.c -o isr_test.o
isr_test.c:13: warning: `SIG_USB_HW' appears to be a misspelled signal handler

Here's the source:
#include <stdlib.h>
#include <stdio.h>
#include <avr/io.h>
#include <avr/signal.h>

#define REG(r)      (*((uint8_t *)(r)))
#define FEND_P0_CR  REG(0x44)
#define EPEN        7
#define EPDIR       2
#define UIER        REG(0x1FF3)
#define FEP0IE      0

SIGNAL(SIG_USB_HW) { volatile int i; for (i=0; i<20; i++); }

int main(int argc, char **argv) {
    FEND_P0_CR = _BV(EPEN) | _BV(EPDIR);
    UIER |= _BV(FEP0IE);
    return 0;

thanks in advance,


reply via email to

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