Closed vanvught closed 6 years ago
What kind of IDE you used?
pi@nuc-i5:~/workspace/lib-wiznet$ arm-none-eabi-gcc --version arm-none-eabi-gcc (GCC) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@khj098765 Please will consider to re-open this issue and fix the bug? Thanks.
@vanvught this is not bug. There is no error in my environment. Why do not you answer my question? I can not help you unless you answer me about my question.
Hi @khj098765 , I have given an answer. I am using -> arm-none-eabi-gcc (GCC) 7.3.0 The IDE is not important. I get the same errors using Eclipse as well when working on the command-line. The library cannot be build with -Werror , which is a bug for me. Thanks, Arjan
Hi @vanvught OK, you use to arm-none-eabi-gcc 5.4.1 Try it. I will try it use to 7.3.1 version thank you, justinkim
Hi @vanvught I did it few minute ago. compiled well in 7.3.1 I have no idea what the problem is with just information you give me. please give me a project files that can not be compiled. my e-mail is justinkim@wiznet.io thank you, justinkim
@khj098765 Hi JustinKim, I can also reproduce the bug on the Raspberry Pi platform.
gcc -I./include -I./ioLibrary_Driver/Ethernet -I./../lib-bcm2835_raspbian/include -I./../lib-debug/include -Wall -Werror -O2 -DWIZCHIP=5100 -c ioLibrary_Driver/Ethernet/socket.c -o build_linux/W5100/ioLibrary_Driver/Ethernet/socket.o ioLibrary_Driver/Ethernet/socket.c: In function '_sendto': ioLibrary_Driver/Ethernet/socket.c:521:36: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] if((taddr == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_IPINVALID; ^ ioLibrary_Driver/Ethernet/socket.c:522:36: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] if((port == 0) && (getSn_MR(sn)&Sn_MR_MACRAW != Sn_MR_MACRAW)) return SOCKERR_PORTZERO; ^ cc1: all warnings being treated as errors Makefile.Linux:62: recipe for target 'build_linux/W5100/ioLibrary_Driver/Ethernet/socket.o' failed make[1]: [build_linux/W5100/ioLibrary_Driver/Ethernet/socket.o] Error 1 make[1]: Leaving directory '/development/workspace/lib-wiznet' Makefile:33: recipe for target '../../lib-wiznet/lib_linux/libwiznet5100.a' failed make: [../../lib-wiznet/lib_linux/libwiznet5100.a] Error 2
pi@raspberrypi-3:/development/workspace/lib-wiznet/examples $ gcc --version gcc (Raspbian 4.9.2-10+deb8u1) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I will send you the complete project files.
Thanks, Arjan
This will fix the compile warning. I will leave it to you to test if this operates properly.
_WIZCHIP WIZCHIP =
{
_WIZCHIP_IO_MODE_,
_WIZCHIP_ID_ ,
{ //WIZCHIP.CRIS
wizchip_cris_enter,
wizchip_cris_exit
},
{ //WIZCHIP.CS
wizchip_cs_select,
wizchip_cs_deselect
},
//M20150601 : Rename the function
//wizchip_bus_readbyte,
//wizchip_bus_writebyte
//wizchip_spi_readbyte,
//wizchip_spi_writebyte
{ //WIZCHIP.IF
{ //WIZCHIP.IF.BUS
wizchip_bus_readdata,
wizchip_bus_writedata
},
//Empty SPI element //WIZCHIP.IF.SPI
},
};
-A fellow developer
That fixed it for me, thanks @MrEngineer02
I fixed it. thank you
This file cannot be build with -Werror
Ethernet/wizchip_conf.c:166:7: error: missing braces around initializer [-Werror=missing-braces] { ^ Ethernet/wizchip_conf.c:169:7: wizchip_cris_enter, { wizchip_cris_exit, } wizchip_cs_select, { wizchip_cs_deselect, } Ethernet/wizchip_conf.c:176:7: wizchip_bus_readdata, { { Ethernet/wizchip_conf.c:180:7: }; }