Hello all!
Has anyone had success using LwIP along with some of the xilkernel functions in a system that is based on the PPC and hard Trimode Ethernet MAC?
I keep running into a problem where the xtemac driver pulls in some xilinx header files that collide with unistd.h (pulled in by e.g. pthread.h).
make -f system.make echo_program started...
powerpc-eabi-gcc -O2 echo/src/socket.c -o echo/executable.elf \ -Wl,-T -Wl,echo_linker_script.ld -g
-I./ppc405_0/include/ -L./ ppc405_0/lib/ \ -lxilkernel -llwip4
In file included from /home/tools/EDK_9.1/gnu/powerpc-eabi/lin/bin/../lib/gcc/po werpc-eabi/4.1.1/../../../../powerpc-eabi/include/unistd.h:4, from echo/src/socket.c:62: /home/tools/EDK_9.1/gnu/powerpc-eabi/lin/bin/../lib/gcc/powerpc-eabi/4.1.1/../.. /../../powerpc-eabi/include/sys/unistd.h:144: error: conflicting types for ?sleep? ./ppc405_0/include/sleep.h:32: error: previous declaration of ?sleep? was here
alternately:
make -f system.make echo_program started... In file included from ./ppc405_0/include/xenv_none.h:60, from ./ppc405_0/include/xenv.h:73, from ./ppc405_0/include/xtemac.h:490, from echo/src/socket.c:61: ./ppc405_0/include/sleep.h:32: error: conflicting types for `sleep' /home/tools/EDK_9.1/gnu/powerpc-eabi/lin/bin/../lib/gcc/powerpc-eabi/4.1.1/../../../../powerpc-eabi/include/sys/unistd.h:144: error: previous declaration of `sleep' was here
The above examples were generated by taking the example project ml403_ppc_lwip_temac_fifo_91i.zip, building it as-is (well, after fixing the absolute pathnames in the system.xmp). I then opened the "echo" application and edited its source file echo/src/socket.c. I added the line #include either between the Xilinx headers and lwip headers (first case) or before all other headers (second case).
I'm looking to use both lwip and the functions in xilkernel (set thread priority and mutexes). Unfortunately, the headers needed for the functions in xilkernel pull in unistd.h.
Note that similar example designs which use xemac (opb_ethernet), such as xapp434, work fine with and without unistd.h.
I opened a webcase with Xilinx, unfortunately it's the start of a long weekend so it'll be at least three days before I can get a response. So I thought I'd try my luck here.
Thanks in advance for any help or suggestions!
ken