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

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

Re: [avr-gcc-list] SBIC PINx, ... won't work


From: Dmitry K.
Subject: Re: [avr-gcc-list] SBIC PINx, ... won't work
Date: Fri, 26 Dec 2003 10:43:23 +1000
User-agent: KMail/1.5

26 Dec 2003 address@hidden wrote:
> ...
> I'm trying to compile an asm routine for usb data transfer with FTDI's
> FT245BM. It worked ok for the at90s2313 and an old avr-gcc but when I
> tried to compile it for atmega162 it didn't find crtm162.o, so I updated
> everything.
> It seems to find the file now but whatever mmcu I use, it results in an
> error for commands like this:
>
> sbic PIND, USB_RXF
>
> saying:
>
> usb.asm:12:1: warning: no newline at end of file
> usb.asm: Assembler messages:
> usb.asm:8: Error: number must be less than 32
>
> First of all, there's definetly a new line at the end of my file.
> If it was just that, it wouldn't be a problem for me at all.
> But it won't compile because of line 8, and line 8 is the above
> mentioned "sbic PIND, USB_RXF".
>
> What's wrong with it? I use the following the command to compile my file:
>
> avr-gcc -c -Wa,-gstabs -x assembler-with-cpp -mmcu=atmega162 usb.asm
>

Please, try:

   /* begin of your programm */
   #define __SFR_OFFSET 0
   #include <avr/io.h>
   ...

For compilation of old asm-programs I place to <install-dir>/avr/include
file with name "io-avr.h" (is absent in new avr-libc):

   #ifdef __ASSEMBLER__
     #define __SFR_OFFSET    0
   #else
     #warning "<io-avr.h> is deprecated, use <avr/io.h> instead"
   #endif
   #include <avr/io.h>

Regards.



reply via email to

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