[En-Nut-Discussion] warning: assignment discards qualifiers from pointer target type
José Vallet
jose.vallet at hut.fi
Tue Oct 18 17:50:14 CEST 2005
Hello all.
I have just bought an Ethernut 2.1 for a project and I am starting with
all the instalations and examples.
I installed the latest stuff that I found:
-WinAVR 20050214
-ethernut 3.9.8
Then I followed the instructions of the "Ethernut software Manual (June
2005)" and followed the "Quick Start With WinAVR"
-Installing Nut/OS at C:\ethernut-3.9.8
-Started Nut/OS configurator and choose ethernut21b.conf as the hardware
configuration file
-Edit->Settings and
*Repository file: c:/ethernut-3.9.8/nut/conf/repository.nut
*Source directory: c:/ethernut-3.9.8/nut (I have the WinAVR stuff in
the path)
Platform: avr-gcc
Build directory: c:/ethernut-3.9.8/nutbld
Install directory: c:/ethernut-3.9.8/nutbld/lib
*Tools Path: c:/ethernut-3.9.8/nut/tools/win32;
*Application Directory c:/ethernut-3.9.8/nutapp
*Programmer: avr-uisp-stk500
-Tools-> check GCC for AVR
-Buld->Generate Build tree
-Buid->Build Nut/OS
And no problem until now. BUT, when I try to compile the httpd example I
found 2 problems:
1- A "scary :-)" warning message:
"warning: assignment discards qualifiers from pointer target type".
I couldn't solve this one.
2-If I do "make clean", after it fails to compile. It seems that the
"make clean" deletes the "urom.c" file among others. Then, when building
the application again, the "make" cannot find the "crurom" application.
I could solve this one by adding manually the
"C:\ethernut-3.9.8\nut\tools\win32" folder to the path. But there's
something that I don't understand. In the configurator I set up the
tools path to "c:/ethernut-3.9.8/nut/tools/win32;", and as said in the
documentation, "The Configurator will add these entries to the PATH
environment when running the compiler". So, it should be included when
compiling, right?
What am I missing here?
Thanks in advance.
José
Here I put a "command session" that might give more information.
*******
*******Before adding "C:\ethernut-3.9.8\nut\tools\win32" to the path
*******
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/httpd
$ ls
HTTPD.SRC Makefile httpd.prj httpserv.c sample urom.c
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/httpd
$ make all
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=httpserv.lst -D__HARVARD_ARCH__
-DETHERNUT2 -Ic:/e
thernut-3.9.8/nutbld/include -Ic:/ethernut-3.9.8/nut/include httpserv.c
-o httpserv.o
httpserv.c: In function `ShowSockets':
httpserv.c:311: warning: assignment discards qualifiers from pointer
target type
httpserv.c:314: warning: assignment discards qualifiers from pointer
target type
httpserv.c:317: warning: assignment discards qualifiers from pointer
target type
httpserv.c:320: warning: assignment discards qualifiers from pointer
target type
httpserv.c:323: warning: assignment discards qualifiers from pointer
target type
httpserv.c:326: warning: assignment discards qualifiers from pointer
target type
httpserv.c:329: warning: assignment discards qualifiers from pointer
target type
httpserv.c:332: warning: assignment discards qualifiers from pointer
target type
httpserv.c:335: warning: assignment discards qualifiers from pointer
target type
httpserv.c:338: warning: assignment discards qualifiers from pointer
target type
httpserv.c:341: warning: assignment discards qualifiers from pointer
target type
httpserv.c:344: warning: assignment discards qualifiers from pointer
target type
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=urom.lst -D__HARVARD_ARCH__ -DETHERNUT2
-Ic:/ether
nut-3.9.8/nutbld/include -Ic:/ethernut-3.9.8/nut/include urom.c -o urom.o
avr-gcc httpserv.o urom.o -mmcu=atmega128
-Wl,--defsym=main=0,-Map=httpserv.map,--cref
-Lc:/ethernut-3.9.8/nutbld/lib c:/ethernut-3.9.8/nutbld/lib/nu
tinit.o -lnutnet -lnutpro -lnutfs -lnutos -lnutdev -lnutnet -lnutcrt -o
httpserv.elf
avr-objcopy -R .eeprom -O ihex httpserv.elf httpserv.hex
rm httpserv.elf
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/httpd
$ ls
HTTPD.SRC Makefile httpd.prj httpserv.c httpserv.hex httpserv.lst
httpserv.map httpserv.o sample urom.c urom.lst urom.o
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/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 httpserv.i urom.i
rm -f urom.c
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/httpd
$ ls
HTTPD.SRC Makefile httpd.prj httpserv.c sample
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/httpd
$ make all
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=httpserv.lst -D__HARVARD_ARCH__
-DETHERNUT2 -Ic:/e
thernut-3.9.8/nutbld/include -Ic:/ethernut-3.9.8/nut/include httpserv.c
-o httpserv.o
httpserv.c: In function `ShowSockets':
httpserv.c:311: warning: assignment discards qualifiers from pointer
target type
httpserv.c:314: warning: assignment discards qualifiers from pointer
target type
httpserv.c:317: warning: assignment discards qualifiers from pointer
target type
httpserv.c:320: warning: assignment discards qualifiers from pointer
target type
httpserv.c:323: warning: assignment discards qualifiers from pointer
target type
httpserv.c:326: warning: assignment discards qualifiers from pointer
target type
httpserv.c:329: warning: assignment discards qualifiers from pointer
target type
httpserv.c:332: warning: assignment discards qualifiers from pointer
target type
httpserv.c:335: warning: assignment discards qualifiers from pointer
target type
httpserv.c:338: warning: assignment discards qualifiers from pointer
target type
httpserv.c:341: warning: assignment discards qualifiers from pointer
target type
httpserv.c:344: warning: assignment discards qualifiers from pointer
target type
crurom -r -ourom.c sample
make: crurom: Command not found
make: *** [urom.c] Error 127
*******
*******AFTER adding "C:\ethernut-3.9.8\nut\tools\win32" to the path
*******
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/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 httpserv.i urom.i
rm -f urom.c
jose at aut-090 /cygdrive/c/ethernut-3.9.8/nutapp/httpd
$ make all
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=httpserv.lst -D__HARVARD_
ARCH__ -DETHERNUT2 -Ic:/ethernut-3.9.8/nutbld/include
-Ic:/ethernut-3.9.8/nut/include httpserv.c -o httpserv.o
httpserv.c: In function `ShowSockets':
httpserv.c:311: warning: assignment discards qualifiers from pointer
target type
httpserv.c:314: warning: assignment discards qualifiers from pointer
target type
httpserv.c:317: warning: assignment discards qualifiers from pointer
target type
httpserv.c:320: warning: assignment discards qualifiers from pointer
target type
httpserv.c:323: warning: assignment discards qualifiers from pointer
target type
httpserv.c:326: warning: assignment discards qualifiers from pointer
target type
httpserv.c:329: warning: assignment discards qualifiers from pointer
target type
httpserv.c:332: warning: assignment discards qualifiers from pointer
target type
httpserv.c:335: warning: assignment discards qualifiers from pointer
target type
httpserv.c:338: warning: assignment discards qualifiers from pointer
target type
httpserv.c:341: warning: assignment discards qualifiers from pointer
target type
httpserv.c:344: warning: assignment discards qualifiers from pointer
target type
crurom -r -ourom.c sample
avr-gcc -c -mmcu=atmega128 -Os -fno-delete-null-pointer-checks -Wall
-Wstrict-prototypes -Wa,-ahlms=urom.lst -D__HARVARD_ARCH
__ -DETHERNUT2 -Ic:/ethernut-3.9.8/nutbld/include
-Ic:/ethernut-3.9.8/nut/include urom.c -o urom.o
avr-gcc httpserv.o urom.o -mmcu=atmega128
-Wl,--defsym=main=0,-Map=httpserv.map,--cref
-Lc:/ethernut-3.9.8/nutbld/lib c:/eth
ernut-3.9.8/nutbld/lib/nutinit.o -lnutnet -lnutpro -lnutfs -lnutos
-lnutdev -lnutnet -lnutcrt -o httpserv.elf
avr-objcopy -R .eeprom -O ihex httpserv.elf httpserv.hex
rm httpserv.elf
More information about the En-Nut-Discussion
mailing list