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

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

Re: [avr-gcc-list] Butterfly code ported to gcc with bugs...


From: Joerg Wunsch
Subject: Re: [avr-gcc-list] Butterfly code ported to gcc with bugs...
Date: Tue, 1 Jul 2003 11:32:37 +0200 (MET DST)

"Desi" <address@hidden> wrote:

> I did port the butterfly code to GCC, 
> but Still have a lot of warnings, no 
> errors, and need help to debug this code
> may be if some one of you are interested,
> let me know, here is attached the code 
> with the make file, to run just do make or 
> make all

Sigh, i wish these Atmel folks were less sloppy about upper/lowercase
filenames.  It took me quite some time to get the various #include
statements match the actual filenames.

I think most of the work will be to convert the interrupt handlers
from IAR style to avr-gcc style.

The »array subscript has type `char'« can certainly be ignored, though
it might be worth the while to research whether the default signedness
of the gcc "char" type is OK (i guess gcc will promote them to a
signed int before actually applying them as an array index).

The »comparison is always false due to limited range of data type«
warnings are more serious.  Perhaps this as well as the integer
promotion mentioned before can be worked around using -funsigned-char
in the gcc CFLAGS.  The clean solution though would be to explicitly
use "signed char" vs. "unsigned char" in the code (resp. to use the
appropriate types from the C standard header <inttypes.h>).

»built-in function `index' declared as non-function« could only be
fixed in the gcc sources; `index' should not be a built-in function
for avr-gcc.

Finally, the linker warning »size of symbol `LCD_character_table'
changed from 2 to 108 in LCD_driver.o« should be resolved, but given
that it's a single warning, this will probably be the last one.  This
most likely corresponds to the compiler warning »array
`LCD_character_table' assumed to have one element« which is just an
indication of sloppy programming style.  Hmm, given that the comment
on that variable in demo.c is in Spanish (which i can only partially
understand), my guess is that you're missing an "extern" keyword
there.
-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/


reply via email to

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