This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RM57 lwIP problem

Other Parts Discussed in Thread: HALCOGEN

Hello there,


I've been trying to get lwIP working on my RM57 Hercules development kit, but when I import the example code from Texas Instruments, I get hundreds of errors of type #10056. Is there anyone who has FreeRTOS and lwIP working? Can you please share your code with me? I can't find what's wrong. :(

Regards,

Jason

  • Jason,

    Look at this post: e2e.ti.com/.../301698

    There's a file in lwIP that includes other C files -- I don't care for this much myself but I bet it's your problem.

    When you import - you need to 'exclude project from build' on the .c files that are included by the 'top' .c file otherwise you'll get tons of duplicate definition errors as the C file will wind up getting compiled twice (once standalone, once through include).

    The 'offending' file is:
    <install>HALCoGen EMAC Driver with lwIP Demonstration\v00.03.00\lwip-1.4.1\ports\hdk\lwiplib.c

    It includes a bunch of other C files --- and you need to then manually 'exclude' these same C files from your build or else the compiler will wind up compiling them twice.

    This I think is done as a way to turn on/off features & protocols but it doesn't make the project very portable as it relies on build settings that you have to change in the GUI.

    In the project view of CCS you can right click on files and folders and select "Exclude From Build' I think if you do that it will fix the issue. Not sure why it wasn't done when you imported. Maybe you didn't import as a "CCS Project" but some other way?

    /*
    ** lwIP high-level API/Stack/IPV4/SNMP/Network Interface/PPP codes
    */
    #include "src/api/api_lib.c"
    #include "src/api/api_msg.c"
    #include "src/api/err.c"
    #include "src/api/netbuf.c"
    #include "src/api/netdb.c"
    #include "src/api/netifapi.c"
    #include "src/api/tcpip.c"
    #include "src/api/sockets.c"

    #include "src/core/dhcp.c"
    #include "src/core/dns.c"
    #include "src/core/init.c"
    #include "src/core/mem.c"
    #include "src/core/memp.c"
    #include "src/core/netif.c"
    #include "src/core/pbuf.c"
    #include "src/core/raw.c"
    #include "src/core/stats.c"
    #include "src/core/sys.c"
    #include "src/core/tcp.c"
    #include "src/core/tcp_in.c"
    #include "src/core/tcp_out.c"
    #include "src/core/udp.c"

    #include "src/core/ipv4/autoip.c"
    #include "src/core/ipv4/icmp.c"
    #include "src/core/ipv4/igmp.c"
    #include "src/core/ipv4/inet.c"
    #include "src/core/ipv4/inet_chksum.c"
    #include "src/core/ipv4/ip.c"
    #include "src/core/ipv4/ip_addr.c"
    #include "src/core/ipv4/ip_frag.c"

    #include "src/core/snmp/asn1_dec.c"
    #include "src/core/snmp/asn1_enc.c"
    #include "src/core/snmp/mib2.c"
    #include "src/core/snmp/mib_structs.c"
    #include "src/core/snmp/msg_in.c"
    #include "src/core/snmp/msg_out.c"

    #include "src/netif/etharp.c"
    #include "src/netif/loopif.c"

    #include "src/netif/ppp/auth.c"
    #include "src/netif/ppp/chap.c"
    #include "src/netif/ppp/chpms.c"
    #include "src/netif/ppp/fsm.c"
    #include "src/netif/ppp/ipcp.c"
    #include "src/netif/ppp/lcp.c"
    #include "src/netif/ppp/magic.c"
    #include "src/netif/ppp/md5.c"
    #include "src/netif/ppp/pap.c"
    #include "src/netif/ppp/ppp.c"
    #include "src/netif/ppp/ppp_oe.c"
    #include "src/netif/ppp/randm.c"
    #include "src/netif/ppp/vj.c"

    /*
    ** HDK-specific lwIP interface/porting layer code.
    */
    #include "ports/hdk/perf.c"
    #include "ports/hdk/sys_arch.c"
    #include "ports/hdk/netif/hdkif.c"
    #include "locator.c"
  • Hi Anthony,
    Thanks for the fast response. All I had to do was 'exclude from build'.
    Now my project builds properly!

    Thanks very much!
  • Hi Jason,

    Please find reworked project for LaunchXL2 with RM57 and LwIP 2.0. It has implemented much more reliable DHCP renew and Halcogen hcg and dil files created from scratch.

    Piotr

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/312/2806.EMAC_5F00_LAUNCHXL2_5F00_RM57L_5F00_NEW.7z