[En-Nut-Discussion] Can't compile NutOs (2)

Johan van der Stoel j.v.d.stoel at stream-it.nl
Thu Sep 16 21:23:01 CEST 2004


Dear Harald,

This indeed solved the problem, but after going further I run against
another problem.
Now it is page 24 where it goes wrong: see the logging below.

D:\ethernut\nutapp-13g\httpd>make clean
rm -f httpserv.o urom.o
rm -f httpserv.hex
rm -f httpserv.eep
rm -f httpserv.obj
rm -f httpserv.map
rm -f httpserv.lst urom.lst
rm -f httpserv.bak urom.bak
rm -f urom.c

D:\ethernut\nutapp-13g\httpd>make
avr-gcc -c -mmcu=atmega128 -Os -Wall -Wstrict-prototypes -Wa,-ahlms=httpserv
.lst
 -D__HARVARD_ARCH__ -ID:/ethernut/build/include -ID:/ethernut/nut/include
https
erv.c -o httpserv.o
httpserv.c: In function `ShowForm':
httpserv.c:393: warning: implicit declaration of function `strtok_r'
httpserv.c:393: warning: assignment makes pointer from integer without a
cast
httpserv.c:400: warning: assignment makes pointer from integer without a
cast
httpserv.c:406: warning: assignment makes pointer from integer without a
cast
crurom -r -ourom.c sample
process_begin: CreateProcess((null), crurom -r -ourom.c sample, ...) failed.
make (e=2): Het systeem kan het opgegeven bestand niet vinden. (Translated:
The system cannot find the file)
make: *** [urom.c] Error 2

D:\ethernut\nutapp-13g\httpd>

I think this problem is related to the programmer I use. In the configurator
I only can select (?) avr-uisp-stk500, but I only have your cable which
connects at one side to the centronics port and at the other side to the ISP
port. I also have a E-lab JTAG programmer; both programmers only need a
simple hex file...

How to proceed?

Best regards,
Johan van der Stoel

-----Oorspronkelijk bericht-----
Van: Harald Kipp [mailto:harald.kipp at egnite.de]
Verzonden: donderdag 16 september 2004 14:51
Aan: j.v.d.stoel at stream-it.nl; Ethernut User Chat (English)
Onderwerp: Re: [En-Nut-Discussion] Can't compile NutOs



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