Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » AVR-GCC
  • » [avr-gcc-list] avr-gcc warning about SIGNAL(SIG_USB_HW) [RSS Feed]

#1 Oct. 28, 2005 05:17:17

Dean H.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

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


Hello,Below is a test program that exhibits two issues I'm having. #1 isjust a notice, maybe a bug? Workaround recommendations for #2 areappreciated:1) I compile the same source code with the same makefile on twodifferent OSs. The result is I get a "misspelled signal handler"warning on Win98 but not on Mac OS X 10.4. Same results when usingSIGNAL() 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 builtfrom source. The only compiler differences I can see is that Win98was configured with "--enable-languages=c,c++" whereas with Mac it isjust "--enable-languages=c".2) Results of compiling on both OSs is this: the vector table (asseen in __vectors in the objdump) has the USB_HW vector set todefault; 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 -Wstrict-prototypes -Wa,-adhlns=isr_test.lst -std=gnu99 -MD -MP -MF .dep/isr_test.o.d isr_test.c -o isr_test.oisr_test.c:13: warning: `SIG_USB_HW' appears to be a misspelledsignal handlerHere'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,

!!Dean



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

#2 Oct. 28, 2005 06:06:58

Joerg W.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

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


Dean Hall <> wrote:

> 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.

Eric Weddington pulled a patch out of GCC's CVS back into his
distribution that makes the compiler warn about misspelled signal
handlers, as this feature turned out to be a frequently needed item.

This functionality will be available by default in GCC 4.x and above.

> 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.

Sure, it told you you've misspelled it, didn't it?

> Here's the command line and warning:

> avr-gcc -c -mmcu=at43usb355 -I. -gstabs -D__AVR_AT43USB355__...

If you look into <avr/io43u35x.h>, this vector is called SIG_USB_INT
there.

We are currently in the process of adding a second set of interrupt
vector names that will be more in line with each device's datasheet
name. So if the datasheet says e.g. "TIMER0, OVF" as the interrupt
source, the new vector name will be TIMER0_OVF_vect.

However, this transition has been done based on Atmel's XML files, and
as there aren't any XML files available for the AT43USBxx devices, I
could not convert them.

--
cheers, J"org .-.-. --... ...-- -.. . DL8DTLhttp://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.orghttp://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Offline

  • Root
  • » AVR-GCC
  • » [avr-gcc-list] avr-gcc warning about SIGNAL(SIG_USB_HW) [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of November
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support