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.

Undefined symbols in ethernetip_stack.lib

Other Parts Discussed in Thread: AM3352, SYSBIOS

     We are trying to build a AM3352 sys/bios system with the NDK instead of lwip. We now have several linker errors that are related to our use of the ethernetip_stack.lib. Versions:

Processor AM3352
Code Composer Version: 5.5.0.00077
Compiler TI v5.1.6
SYS/BIOS 6.35.4.50
XDCTools 3.25.3.72
NDK 2.23.2.03

     We have been using the ethernetip_adapter example from am335x_sysbios_ind_sdk_1.1.0.4 because there are not any standard Ethernet CPSW examples for reference. We have added app_restart.c, eip_main.c and eip_ndk.c as they are in the example but it seems some of it is not necessary. We have gotten it to compile now but the ethernetip_stack.lib seems to require you to have certain functions in your application:

undefined symbols:

 GetDeviceType     C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 GetMajorRevision  C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 GetMinorRevision  C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 GetProductCode    C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 GetProductName    C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 GetSerialNum      C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 GetVendorId       C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 SHM_DataOutCopied C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 SHM_NewDataIn     C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_api.obj>
 SHM_SetInParams   C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_adt.obj>
 SHM_SetOutParams  C:\ti\am335x_sysbios_ind_sdk_1.1.0.4\sdk\protocols\ethernetip_adapter\stack_lib\ethernetip_stack.lib<user_adt.obj>

     Is there a document anywhere that describes all functions that are necessary to use this library or API? Are there any examples (even in beta testing) of using the SYS/BIOS with NDK system that sets up and uses standard UDP sockets? Something for MAC address setting, DCHP running and a raw UDP socket?

Thanks,

     John C.

  • We have added a device.c file to get rid of the linker warnings. After completing the build it seems that the MAC address is not getting set correctly and the DHCP start-up is also failing.

    [CortxA8]

    00000.000 Illegal priority call to llEnter()
    00000.000 Illegal call to llExit()
    Service Status: DHCPC    : Enabled  : Running  : 000
    Service Status: DHCPC    : Enabled  : Running  : 000
    Service Status: DHCPC    : Disabled :          : 000

         We have no visibility into SetMacConfiguration() and AddNetifEntryFn() to see if things are getting set correctly. We even put a call in to DisplayMacid() to see if the MAC was being found correctly and it was not. The MAC address in our CPSW setup comes from the AM3352 control registers of SOC_CONTROL_REGS (0x44E10000)
     + MAC_LO/MAC_HI(0x0630 and 0x634). The mac is showing up as: 74:e2:f9:3e:0d:12 and we are not sure how is has gotten it.

         It seems that we are not building this correctly for CPSW (vs. PRUSS). Has anyone gotten this setup to work and if so are there examples of getting the MAC phy working correctly?

    Thanks,

         John C.

  • We have now rebuilt NDK 2.23.2.03 from the instructions on this link:

     http://processors.wiki.ti.com/index.php/Rebuilding_The_NDK_Core_Using_Gmake

         We now have a ndk_2_24_00_11_copy directory that has been built for ti.targets.arm.elf.A8F and ti.targets.arm.elf.A8Fnv(not sure if these are the correct ones.) How do we get CCS 5.5.0.00077 to recognize this new NDK package so that we can now use it?

    Thanks,

         John C.

  • We have gotten the rebuilt NDK into our project, but it has not helped with the debugging. Let me ask a very basic question about the needed pieces for the NDK.

    We currently have not selected the NDK's Data Link Layer. The only one that would apply to us is the EMAC, but in selecting EMAC there is no reference/description of how to use the CPSW on the TI335x's.

         Is this what we need to add to our build and if so where is the API we need to meet?

    Thanks for you help,

         John C.

  • John,

    yes, such an EMAC module would be beneficial. It should provide low level drivers for NDK. Now for AM335x we have no module that is packaged in RTSC form so that it can show up here...

    There are industrial protocol drivers in the IA-SDK that are also providing Ethernet NDK integration in basci form. E.g. the Ethernet/IP one. Best advice here is to compile the Ethernet/IP example and strip of what you don't need. Probably not a simple task as you might have seen as you need  to work through some dependencies.

    Regards,

  • Hey Frank,

         Because of our issues with the CPSW built NDK, we are trying to understand what the issue could be. We have used the EhernetIP example as a model, but because it does not work and the MAC is not correctly being recognize we thought that there most be a low level interface that is not correct. I see in this thread from last year about having "NIMU compliant" Ethernet driver code and it seems they were facing similar issues.

         http://e2e.ti.com/support/embedded/tirtos/f/355/p/184896/902649.aspx#902649

         Are there documents that would help us understand what the hooks into the NDK are for a CPSW build?

    Thanks,

         John C.

  • Hi Frank,

         This is where we stand at this point. We have done everything in the EthernetIP_example using the definitions for USE_CPSW_DRIVER. We can't run the EthernetIP_example as we our using our own AM3352 card, but when we reach the call for DisplayMacid-->NIMUIoctl, the ptr_device is empty. This seems to indicate that the NDK does not have any devices. So our question is where in the EthernetIP_example does the ptr_device get set? If it is part of the driver registration, where is that done in the example code?

    Thanks,

         John C.

    EthernetIP_adapter example:

            PinMuxConfig(idkMux);
            CPSWClkEnable();
            LEDInit();
            SetMacConfiguration(&config);
            SpiFlashInit(1,0);
    PortModeSelect_Ind
    AddNetifEntryFn
    I2CSetDelayFn
    DisplayMacid

    Our Code:

        We have already done Pin Mux setup...
    Port mode is already selected...
    CPSWClkEnable();
        SetMacConfiguration();
        AddNetifEntryFn()
        DisplayMacid(); --> During the call to NIMUIoctl (NIMU_GET_DEVICE_MAC,...) there is no ptr_device found, so
    the list is empty.
  • Hi John,

    I am really sorry for your issues. However I did not use the Ethernet/IP example at all so far. I need to defer you to our factory team.

    What I have seen is that the current Ethernet/IP example in IA-SDK 1.1..0.4 is not based on CPSW but using PRU -ICSS based switch firmware. So you are most likely missing code that is connecting NDK to CPSW. I know we had experimental code for such an example internally but it never made it to product level. So you might contact your local FAE and ask for further help outside of the forum.

    Regards,

  • Hey Frank,

         Thank you for the reply. We seem to be very close to getting this working as it would hopefully resolve a few issues we were with lwip. I'll get in touch with are FAE.

    Thanks again for your time,

         John C.

  • Hi John,

                The ethernetip_adapter  example will work over CPSW and for that you need to enable the macro USE_CPSW_DRIVER and build the application.

                You can strip off the Ethernet/IP related files from the application and run it as a switch application, not straight forward though.

            You can remove all files except main and make the changes listed below to get the application to build.

                1) remove unwanted includes from main.c

                2) Comment out EIPMain()  and GetAssignedIP() API call and definition from the main.c file

                3) Remove global variables used by Ethernetip application

                4) Remove System_atexit(app_exit_handler); from main function

                5) Remove the ISR registration for UART.

                                   Replace   UartOpen(uartInstance, UartIsr); with UartOpen(uartInstance, NULL);

               6) Remove the Ethernetip dependancy from LedFxn Task.

    Thanks,

    Prajith

  • Hi Prajith,

         We do have something close to working (I hope) and the current situation is summed up  in this thread:

    http://e2e.ti.com/support/embedded/tirtos/f/355/t/361927.aspx

    Thanks,

         John C.