Skip to content

Problem in echo.c file #2

@dnygren

Description

@dnygren

After following the README file's instructions, I wasn't able to get this code to compile using Xilinx SDK 2018.3 . I wasn't the only person who experienced this, so I thought I'd submit an issue. See Xilinx forum thread https://forums.xilinx.com/t5/Processor-System-Design-and-AXI/UDP-packet-sending-with-Zynq/td-p/563836

13:18:46 **** Auto Build of configuration Debug for project echo_server_udp ****
make pre-build main-build 
a9-linaro-pre-build-step
 
Building file: ../src/echo.c
Invoking: ARM v7 gcc compiler
arm-none-eabi-gcc -Wall -O0 -g3 -c -fmessage-length=0 -MT"src/echo.o" -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard -I../../echo_server_udp_bsp/ps7_cortexa9_0/include -MMD -MP -MF"src/echo.d" -MT"src/echo.o" -o "src/echo.o" "../src/echo.c"
../src/echo.c: In function 'recv_callback':
../src/echo.c:57:15: error: dereferencing pointer to incomplete type 'struct ip_addr'
  RemoteAddr = *addr;
               ^~~~~
../src/echo.c:57:13: error: 'RemoteAddr' has an incomplete type 'struct ip_addr'
  RemoteAddr = *addr;
             ^
../src/echo.c: In function 'start_application':
../src/echo.c:96:16: warning: passing argument 2 of 'udp_recv' from incompatible pointer type [-Wincompatible-pointer-types]
  udp_recv(pcb, recv_callback, NULL);
                ^~~~~~~~~~~~~
In file included from ../src/echo.c:5:0:
../../echo_server_udp_bsp/ps7_cortexa9_0/include/lwip/udp.h:123:18: note: expected 'udp_recv_fn {aka void (*)(void *, struct udp_pcb *, struct pbuf *, const struct ip4_addr *, short unsigned int)}' but argument is of type 'void (*)(void *, struct udp_pcb *, struct pbuf *, struct ip_addr *, u16_t) {aka void (*)(void *, struct udp_pcb *, struct pbuf *, struct ip_addr *, short unsigned int)}'
 void             udp_recv       (struct udp_pcb *pcb, udp_recv_fn recv,
                  ^~~~~~~~
src/subdir.mk:51: recipe for target 'src/echo.o' failed
make: *** [src/echo.o] Error 1

13:18:47 Build Finished (took 632ms)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions