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.

Hello Ethernet World Linker issues

Other Parts Discussed in Thread: CCSTUDIO

Hello,

I am attempting to get the hello NDK world program to compile and link on my OMAP L-138 evm6748 board (I am just using the C6748- ARM not installed). I can't seem to find out where the following library references are located. As such- I am getting the following linker errors.

Thank you for the Help!

Mark

 

'Building target: ndk_evm6748_bios5_helloWorld.out'
'Invoking: Linker'
"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/bin/cl6x" -mv6740 -g --diag_warning=225 -z -m"ndk_evm6748_bios5_helloWorld.map" --warn_sections -i"C:/CCStudio_v3.3/ndk_2_20_04_26/ndk_2_20_04_26/packages/ti/ndk/lib/C674" -i"C:/CCStudio_v3.3/ndk_2_0_0/packages/ti/ndk/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/lib" -i"C:/Program Files/Texas Instruments/ccsv4/tools/compiler/c6000/include" -i"C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/rtdx/lib/c6000" -i"C:/Program Files/Texas Instruments/bios_5_41_10_36/packages/ti/bios/lib" --reread_libs --rom_model -o "ndk_evm6748_bios5_helloWorld.out" -l"./helloWorldcfg.cmd"  "./udpHello.obj" "./helloWorldcfg_c.obj" "./helloWorldcfg.obj" "./helloWorld.obj" "./evminit.obj" "./emacHooks.obj" -l"libc.a"
<Linking>

 undefined       first referenced  
  symbol             in file       
 ---------       ----------------  
 _CfgAddEntry    ./helloWorld.obj  
 _CfgFree        ./helloWorld.obj  
 _CfgNew         ./helloWorld.obj  
 _DaemonFree     ./helloWorld.obj  
 _DaemonNew      ./helloWorld.obj  
 _NC_NetStart    ./helloWorld.obj  
 _NC_SystemClose ./helloWorld.obj  
 _NC_SystemOpen  ./helloWorld.obj  
 _NDK_hookCreate ./helloWorldcfg.obj
 _NDK_hookInit   ./helloWorldcfg.obj
 __oscfg         ./helloWorld.obj  
 _inet_addr      ./helloWorld.obj  
 _llTimerTick    ./helloWorldcfg.obj

 _mmZeroInit     ./helloWorld.obj  
>> Compilation failure
 _recvncfree     ./udpHello.obj    
 _recvncfrom     ./udpHello.obj    
 _sendto         ./udpHello.obj    
 _setsockopt     ./udpHello.obj    

error: unresolved symbols remain
error: errors encountered during linking; "ndk_evm6748_bios5_helloWorld.out"
   not built
gmake: *** [ndk_evm6748_bios5_helloWorld.out] Error 1
gmake: Target `all' not remade because of errors.
Build complete for project ndk_evm6748_bios5_helloWorld

 

 

  • The NDK has 2 main pieces:

    • The network stack (board independent, e.g. has no knowledge if which PHY is used, etc).
    • The board-specific drivers.

    I imagine you're probably missing the board-specific drivers.  In particular make sure you download the NSP:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ndk/index.html

     

  • Did you define the environment variables called "NDK_INSTALL_DIR" and "NSP_INSTALL_DIR"?

    I think you must not be getting the NDK libraries linked in somehow, possibly due to the above not being defined.  These symbols are defined in the following libraries:

    • nettool.lib
    • netctrl.lib
    • os_bios5.lib
    • stack.lib

    Which should all come with your NDK core installation.  For example, these libraries are on my computer under

    C:\Program Files\Texas Instruments\ndk_2_20_05_31_eng\packages\ti\ndk\lib\C674

    So, for my installation, NDK_INSTALL_DIR would be defined to point to C:\Program Files\Texas Instruments\ndk_2_20_05_31_eng.

    Steve

  • Steve, thank you for the insight,

    So- I completely uninstalled all TI products and associated drivers, SDKs...etc. Then I reinstalled everything into the "C:\program files\Texas Instruments" directory to keep it all in one place. I installed the following :

    -CCS 4.2

    -NSP 1.0.0.2

    -NDK 2.0.0

    -C6748 device drivers

    --- Most importantly, installed the NDK 2.20.00.19 to get support for the evOMAPL138 Arm9 and evm6748 C674 DSP processors. What I did not know what that I had to copy all of the contents of NDK 2.20.00.19 to the NDK 2.0.1  install directory.

    This has to be my biggest criticism of the TI/Eclipse  IDE- the integration of all these software pieces is horrible!

    At any rate, I did get the example to compile and it does run!  I have been able to ping the EVM board, and I run the helloword.exe 169.254.80.196   and I receieve:

    Testing DSP UDP echo server at 169.254.80.196

    Exiting test.  T = 0 seconds

     

    Not too long after that I get a "fault 2" from the CCS DSP console.

    Is this s timeout? Should I be seeing some other output to the windows sommand line? Would it be better to use a static IP?

    Thank you,

    Mark

     

     

  • Also,

     after playing with this code for a while I reallized that the DSP DHCP is basically timing out because my PC which is connected to it is not providing DHCP service.

    Overall- what I am trying to achieve here is to simply offload data from the DSP to a desktop application, I do not need any communications from the PC to the DSP. That is why I originally thought the helloworld application would be the best place to start. Seems like DHCP is always a problem on a windows PC. So I thought I would statically set the IP address on the helloworld code- I don't know how to do this- and it seems like every thing is abstracted by the task scheduler, so I am having a hard time figuring it out.

     

    I do not really want to get into the client example since it has a bunch of extra code in it to serve up webpages and FTP stuff...etc. Just trying to keep things as simple as possible here. Any suggestions or actual sample code would really be appreciated.

     

    Thanks!

    Mark

  • Update-

    I found out how to configure it all for a static IP and got the same results which are, I see the followinging in the console and try to ping that IP, but NEVER get a reply:

    TCP/IP Stack 'Hello World!' Application
    Using default MAC address
    Using MAC Address: 00-01-02-03-04-05
    EMAC should be up and running
    EMAC has been started successfully
    Registeration of the EMAC Successful
    Network Added: If-1:192.168.1.41

    So, from there I have tried the following:

    -Tried the Client project from the NDK- with the same problem of it not being able to be pinged!

    -Set my host computer IP address to:192.168.1.40 and SNM: 255.255.255.0

    -Changed the MAC address to a different one than that whcich ships (as seen above)

    -DHCP & Static IP configurations in the helloworld.c file

    -Got the latest C6748.gel file (now using the 10/28/2010 version) for the debugger/emulator connection

    -Tried using a Crossover cable and a Straight through cable

    -Starting debugger from the debug button, and from the Target tab->launch selected Configuration

    -Statically linking host table via arp -s 192.168.1.41 00-01-02-03-04-05

    -Using CCS v4.2.3,   NDK v2_20_04_06,   NPS v1_00_00_09,   BIOS v5_41_10_36

    -Tracing through the code via breakpoints, found that the function NC_NetStart() and its callbacks (line 192 of HelloWorld.c) are:

            -Successful through daemonNew() which returns- but there is no reachable code for breakpoints within the dtask_udp_hello(), probably due it being a task?

            -NetworkIPAddr()- returns ok

            -NetworkOpen()- all the code within this function appears to execute properly (although I am no expert), but after this function is allowed to continue past the closing brace

             that is it for the program- I cannot reach any other breakpoints.

    -Clicking my heels, and turning around three times :)

     

    I have no idea where to go from here, I have scoured the E2E community for seemingly anything else.

    Please help!  Thank you.

    Mark

     

     

     

  • I figured it out:

    after looking at all the forums- I think I misinterpreted which Ethernet plug to use on the EVM board- I wrongly used the UI Ethernet plug beacause I thought the baseboard plug was not useable. Apparently I had them backwards. You must use the baseboard plug to get the eample code to work. Incidentally, if you are stuck like I was, if you try

    all of the things I tried- you will likely get your board to work as seen above in (So, from there I have tried the following).

    I am now able to ping my EVM board and it returns the requisite "Hello World!" if I use the Helloworld.exe IPADDRESS from the winapps directory.

     

    Cheers!

    Mark

  • Great news!  Thanks for the update.  I'm glad you figured it out.  That's a difficult problem to diagnose over a forum!  :)

  • Hi Brad,

    after having worked with the 6748 EVM board and CCS 4.2 for a while I would really like to understand how to best setup/install from scratch all of the development tools so that when a new project is created, or examples are used- I do not get all kinds of linker errors. I have had this problem with every project I have created and have re-installed CCS, the BSP, NDK libraries over and and over to no avail- I am sure I am not installing things properly. I also looked at the system variables in windows XP to ensure they were set. But I have to say that the projects are always a huge hassle to deal with- and I am frustrated with manually finding every library and include file and adding them to my project (even ALL  the examples do this) every time. Any expert guidance on this matter would be extremely appreciated.

     Mark

  • I recommend starting a new thread in the CCS forum for these reasons.