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.

Compiler/AM3352: How to link in the SNTP library

Part Number: AM3352
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI C/C++ Compiler

I'm trying to add SNTP to my project but when I build the linker says that 'SNTP_start' is an unresolved symbol.  According to this link in the 'Example Usage' section, it says I must add the library 'ti/ndk/nettools/lib/sntp.lib' then adds "Note that the ".lib" extension should be replaced with the extension that matches the target your application is built for.".  My target is an AM3352 which is an ARM Cortex-A8.  According to the TI Network Developer's Kit (NDK) v2.25 User's Guide, section 1.3.3, the proper file extension for the pre-built libraries is:

.aea8fnv For Cortex-A8 targets (ELF format, little endian, TI compiler, uses hardware-based vector floating point support, recommended over .aea8f)

In CCS properties for the project:  ARM Linker->File Search Path, I added "${NDK_INSTALL_DIR}/packages/ti/ndk/nettools/lib/sntp.aea8fnv".  The console window shows the following:

'Building target: Teller-ExEl-EDS.out'
'Invoking: ARM Linker'
'Flags: -mv7A8 --code_state=32 -me -O2 --opt_for_speed=2 --define=_HSCD_LIB_ --define=BUILDING_LIBCURL --define=DEBUG_LINK_STATUS --define=EXPERT_ELITE_CONFIG_IQF --define=SMARTSOURCE_EXPERT --define=am335x_15x15 --define=DMA_MODE --define=am335x --define=NO_SS_ENDORSE_PRINTFS --define=USE_CPSW_DRIVER --define=TI_SYSBIOS --define=TELLER_HEX_SIGNATURE_VERIFICATION --define=RAPIDXML_NO_EXCEPTIONS --define=WSLIBCFG_CURL_SUPPORT -g --relaxed_ansi --gcc --diag_suppress=1051 --diag_warning=225 --unaligned_access=on --enum_type=int --abi=eabi --signed_chars -z -m"Teller-ExEl-EDS.map" -i"C:/ti/lib" -i"C:/ti/include" -i"C:/ti/ndk_2_25_01_11/packages/ti/ndk/nettools/lib/sntp.aea8fnv" --reread_libs --warn_sections --xml_link_info="Teller-ExEl-EDS_linkInfo.xml" --rom_model'
<Linking>

...

The file C:/ti/ndk_2_25_01_11/packages/ti/ndk/nettools/lib/sntp.aea8fnv does exist in the proper location:

C\>dir C:\ti\ndk_2_25_01_11\packages\ti\ndk\nettools\lib\sntp.aea8fnv
Volume in drive C has no label.

Directory of C:\ti\ndk_2_25_01_11\packages\ti\ndk\nettools\lib

04/17/2017 10:19 AM 256,942 sntp.aea8fnv

What am I missing here?

 

  • Hi Kevin,

    I just installed 2.25.01.11 and the library is there. Can you reinstall and confirm it is there. There should be 76 files in that lib directory.

    Todd
  • Todd,

    As I noted in the original post, the library file (C:/ti/ndk_2_25_01_11/packages/ti/ndk/nettools/lib/sntp.aea8fnv) does exist (see my 'dir' output) and it is being 'included' in the linker library search (see the console output).

    Kevin

  • Sorry. I read it too fast. I checked and the symbol is in the file

    C:\ti\ndk_2_25_01_11\packages\ti\ndk\nettools\lib>c:\ti\ccs7_2_0_00006\ccsv7\tools\compiler\ti-cgt-arm_16.9.3.LTS\bin\armnm.exe sntp.aea8fnv | findstr start
    00000000 t .text:SNTP_start
    00000000 T SNTP_start

    You have the reread_lib flag, so it should not be an ordering issue.

    I was able to add the sntp library to a networking example after I added a call to SNTP_start into the code. I did not get the unresolved symbol (and it was there before I added the library).

    I'll check around here to see if anyone else has seen this. In the meantime, is it possible to attach an exported version of your project that has the problem (or a scaled down one if you need to protect your companies IP).

    Todd
  • I'm getting the same output from the armnm program which is able to find the SNTP_start program

    C:\ti\ndk_2_25_01_11\packages\ti\ndk\nettools\lib>C:\ti\ccsv6\tools\compiler\ti-cgt-arm_5.2.5\bin\armnm.exe C:\ti\ndk_2_25_01_11\packages\ti\ndk\nettools\lib\sntp.aea8fnv | findstr start

    00000000 t .text:SNTP_start
    00000000 T SNTP_start

    I found the problem:  I had added "${NDK_INSTALL_DIR}/packages/ti/ndk/nettools/lib/sntp.aea8fnv" to the "Add <dir> to library search path" rather than the "Include library file or command file as input".  When I put the path to the library in as a file, all is good now.

    Thanks for your assistance.

    Kevin