[En-Nut-Discussion] Can't compile NutOs

Harald Kipp harald.kipp at egnite.de
Thu Sep 16 14:51:07 CEST 2004


>----- Running 'make all' -----
>D:/ethernut/nut/dev/usart.c: In function `UsartRead':
>D:/ethernut/nut/dev/usart.c:231: warning: comparison between signed and 
>unsigned
>make[1]: *** [usart.o] Error 1
>make: *** [all] Error 2
>----- 'make all' failed with error 2 -----
>What did I do wrong?
>

..or, what did I do that it works here?

Actually the compiler is right in your case.

   for (rc = 0; rc < size;) {
with
   int size
and
   size_t rc;

should result in the warning you got and I did not.

To "fix" this change

CPFLAGS = $(MCFLAGS) -Os -Wall -Werror -Wstrict-prototypes 
-Wa,-ahlms=$(<F:.c=.lst) $(DEFS)

in nut/Makedefs.avr-gcc to

CPFLAGS = $(MCFLAGS) -Os -Wall -Wstrict-prototypes -Wa,-ahlms=$(<F:.c=.lst) 
$(DEFS)

Then build the system again, ignoring the warnings.

Harald




More information about the En-Nut-Discussion mailing list