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.

TM4C1294NCPDT: Implementation of SNTP protocol for the tm4c1294ncpdt microcontroller solely wired ethernet based

Part Number: TM4C1294NCPDT

Dear TI Community members,

I am trying to implement the SNTP protocol to my project for which I looked upon over internet and also searched this community forum so I got that the sample code present in the TI resource explorer httpsgetCC3100_EK_TM4C1294XL_TI which implements the SNTP protocol in it. 

So I tried to copy the SNTP only section of this code and to test the code I created a separate project where I used the tcp protocol from the TI NDK and include the ip protocol to run the board on the static ip address.

First of all during the building process I encountered tons of errors related to the project , so I sorted out them one by one anyhow after seeking help from documents , community and internet. During this process of rectifying the errors I saw that the sntp source files are interlinked with the simplelink file and therefore is linked to various other protocols like http, wireless wifi module etc. 

But I want not to use those protocols , I just want to used my application which is running on tcp/ip and is communicating to a remote client on the socket based architecture. Now in this application I want to add one more protocol and that is of SNTP.

So , I want to know that how should I proceed and how can I get sntp protocol running in my system.

regards

Piyush Pandey

  • Hi Piyush,

    First I'd like to address the build errors. httpsgetCC3100 should build out of the box. Let's make sure you get this resolved in the correct manner. Can you import the example again (you'll need to rename the current one if you still have it in your workspace)? After a "rebuild" please copy/paste the build output that shows the errors (and all the versions you are using) into a file. Then attach that file to this thread. Please don't copy/paste into the thread because it makes the thread get long and hard to read.

    Note: some common build errors are
    1) another shell is in your path. For example cygwin or MKS. That shell then gets used by gmake.
    2) Spaces in your install directory or workspace. The build tool does not like that either.

    Todd
  • Hi Todd,

    Thanks for your reply.

    I created the fresh project and than build it and I copied the build log with errors in the .txt file .

    But I think due to the security softwares in the company I am unable to attach the file to this message.

    So I am copying the content of the build log over here.

    Please find it and assist me for the same.

    **** Build of configuration Debug for project Sntp_test ****
    
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O 
    gmake[1]: Entering directory 'D:/RTOS_Workspace/Sntp_test/Debug'
    'Building file: ../Sntp_test.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_50_03_33_core/xs" --xdcpath="C:/ti/bios_6_53_02_00/packages;C:/ti/uia_2_20_00_02/uia_2_20_00_02/packages;C:/ti/tirtos_tivac_2_16_01_14/packages;C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages;C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ndk_2_25_00_09/packages;C:/ti/tirtos_tivac_2_16_01_14/products/uia_2_00_05_50/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ns_1_11_00_10/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C1294NCPDT -r release -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS" "../Sntp_test.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring Sntp_test.xem4f from package/cfg/Sntp_test_pem4f.cfg ...
    generating custom ti.sysbios library makefile ... 
    Starting build of library sources ...
    making D:/RTOS_Workspace/Sntp_test/src/sysbios/sysbios.aem4f ...
    gmake[1]: Entering directory `D:/RTOS_Workspace/Sntp_test/src/sysbios'
    clem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/BIOS.c ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/Hwi_asm.sv7M ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/Hwi_asm_switch.sv7M ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/IntrinsicsSupport_asm.sv7M ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/TaskSupport_asm.sv7M ...
    arem4f BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj ...
    gmake[1]: Leaving directory `D:/RTOS_Workspace/Sntp_test/src/sysbios'
    Build of libraries done.
    clem4f package/cfg/Sntp_test_pem4f.c ...
    "package/cfg/Sntp_test_pem4f.c", line 16989: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 17731: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 18094: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 18376: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 18619: warning: statement is unreachable
    'Finished building: ../Sntp_test.cfg'
    ' '
    gmake[1]: Leaving directory 'D:/RTOS_Workspace/Sntp_test/Debug'
    'Building file: ../EK_TM4C1294XL.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="D:/RTOS_Workspace/Sntp_test" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="EK_TM4C1294XL.d_raw" --cmd_file="configPkg/compiler.opt" "../EK_TM4C1294XL.c"
    
    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'EK_TM4C1294XL.obj' failed
    "../EK_TM4C1294XL.c", line 47: fatal error #1965: cannot open source file "inc/hw_ints.h"
    1 catastrophic error detected in the compilation of "../EK_TM4C1294XL.c".
    Compilation terminated.
    gmake: *** [EK_TM4C1294XL.obj] Error 1
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="D:/RTOS_Workspace/Sntp_test" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d_raw" --cmd_file="configPkg/compiler.opt" "../main.c"
    
    >> Compilation failure
    subdir_rules.mk:30: recipe for target 'main.obj' failed
    "../main.c", line 38: error #71: incomplete type is not allowed
    "../main.c", line 53: error #20: identifier "SlDateTime_t" is undefined
    "../main.c", line 71: warning #225-D: function "sl_DevSet" declared implicitly
    "../main.c", line 71: error #20: identifier "SL_DEVICE_GENERAL_CONFIGURATION" is undefined
    "../main.c", line 72: error #20: identifier "SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME" is undefined
    "../main.c", line 73: error #20: identifier "SlDateTime_t" is undefined
    "../main.c", line 101: error #71: incomplete type is not allowed
    "../main.c", line 104: warning #225-D: function "gethostbyname" declared implicitly
    "../main.c", line 105: error #20: identifier "AF_INET" is undefined
    "../main.c", line 110: warning #225-D: function "htonl" declared implicitly
    "../main.c", line 111: warning #225-D: function "htons" declared implicitly
    "../main.c", line 113: error #71: incomplete type is not allowed
    "../main.c", line 115: warning #225-D: function "SNTP_start" declared implicitly
    "../main.c", line 128: warning #225-D: function "SNTP_forceTimeSync" declared implicitly
    8 errors detected in the compilation of "../main.c".
    gmake: *** [main.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    
    **** Build Finished ****
    

    regards

    Piyush Pandey

  • It looks like you are not just using TI-RTOS, but instead of using the individual uia_2_20_00_02 and and bios_6_53_02_00 products also. Why are you doing this? If you use TI-RTOS all the paths will be setup for you. Additionally, if you use tirtos_tivac_2_16_01_14, you need to use the recommended XDCtools 3.32.00.06. The 3.50 or higher do not work with TI-RTOS for TivaC 2.16.

    So basically, uncheck the SYS/BIOS and UIA products in Project Properties->General->Products and then select the correct XDCtools (on that same screen).

    Todd

  • i Todd ,

    I have included the TI-RTOS into my project here are the files I am attaching with the screenshots and build log of my project settings and project build respectively.

    Piyush

    error_log_01.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    **** Build of configuration Debug for project Sntp_test ****
    "C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O
    gmake[1]: Entering directory 'D:/RTOS_Workspace/Sntp_test/Debug'
    'Building file: ../Sntp_test.cfg'
    'Invoking: XDCtools'
    "C:/ti/xdctools_3_50_03_33_core/xs" --xdcpath="C:/ti/bios_6_53_02_00/packages;C:/ti/uia_2_20_00_02/uia_2_20_00_02/packages;C:/ti/tirtos_tivac_2_16_01_14/packages;C:/ti/tirtos_tivac_2_16_01_14/products/tidrivers_tivac_2_16_01_13/packages;C:/ti/tirtos_tivac_2_16_01_14/products/bios_6_45_02_31/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ndk_2_25_00_09/packages;C:/ti/tirtos_tivac_2_16_01_14/products/uia_2_00_05_50/packages;C:/ti/tirtos_tivac_2_16_01_14/products/ns_1_11_00_10/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.M4F -p ti.platforms.tiva:TM4C1294NCPDT -r release -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS" "../Sntp_test.cfg"
    making package.mak (because of package.bld) ...
    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
    configuring Sntp_test.xem4f from package/cfg/Sntp_test_pem4f.cfg ...
    generating custom ti.sysbios library makefile ...
    Starting build of library sources ...
    making D:/RTOS_Workspace/Sntp_test/src/sysbios/sysbios.aem4f ...
    gmake[1]: Entering directory `D:/RTOS_Workspace/Sntp_test/src/sysbios'
    clem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/BIOS.c ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/Hwi_asm.sv7M ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/Hwi_asm_switch.sv7M ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/IntrinsicsSupport_asm.sv7M ...
    asmem4f C:/ti/bios_6_53_02_00/packages/ti/sysbios/family/arm/m3/TaskSupport_asm.sv7M ...
    arem4f BIOS.obj m3_Hwi_asm.obj m3_Hwi_asm_switch.obj m3_IntrinsicsSupport_asm.obj m3_TaskSupport_asm.obj ...
    gmake[1]: Leaving directory `D:/RTOS_Workspace/Sntp_test/src/sysbios'
    Build of libraries done.
    clem4f package/cfg/Sntp_test_pem4f.c ...
    "package/cfg/Sntp_test_pem4f.c", line 16989: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 17731: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 18094: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 18376: warning: statement is unreachable
    "package/cfg/Sntp_test_pem4f.c", line 18619: warning: statement is unreachable
    'Finished building: ../Sntp_test.cfg'
    ' '
    gmake[1]: Leaving directory 'D:/RTOS_Workspace/Sntp_test/Debug'
    'Building file: ../EK_TM4C1294XL.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="D:/RTOS_Workspace/Sntp_test" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="EK_TM4C1294XL.d_raw" --cmd_file="configPkg/compiler.opt" "../EK_TM4C1294XL.c"
    >> Compilation failure
    subdir_rules.mk:9: recipe for target 'EK_TM4C1294XL.obj' failed
    "../EK_TM4C1294XL.c", line 47: fatal error #1965: cannot open source file "inc/hw_ints.h"
    1 catastrophic error detected in the compilation of "../EK_TM4C1294XL.c".
    Compilation terminated.
    gmake: *** [EK_TM4C1294XL.obj] Error 1
    'Building file: ../main.c'
    'Invoking: ARM Compiler'
    "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=FPv4SPD16 -me --include_path="D:/RTOS_Workspace/Sntp_test" --include_path="C:/ti/ccsv7/tools/compiler/ti-cgt-arm_18.1.1.LTS/include" --define=ccs="ccs" --define=PART_TM4C1294NCPDT -g --gcc --diag_warning=225 --diag_wrap=off --display_error_number --abi=eabi --preproc_with_compile --preproc_dependency="main.d_raw" --cmd_file="configPkg/compiler.opt" "../main.c"
    >> Compilation failure
    subdir_rules.mk:30: recipe for target 'main.obj' failed
    "../main.c", line 38: error #71: incomplete type is not allowed
    "../main.c", line 53: error #20: identifier "SlDateTime_t" is undefined
    "../main.c", line 71: warning #225-D: function "sl_DevSet" declared implicitly
    "../main.c", line 71: error #20: identifier "SL_DEVICE_GENERAL_CONFIGURATION" is undefined
    "../main.c", line 72: error #20: identifier "SL_DEVICE_GENERAL_CONFIGURATION_DATE_TIME" is undefined
    "../main.c", line 73: error #20: identifier "SlDateTime_t" is undefined
    "../main.c", line 101: error #71: incomplete type is not allowed
    "../main.c", line 104: warning #225-D: function "gethostbyname" declared implicitly
    "../main.c", line 105: error #20: identifier "AF_INET" is undefined
    "../main.c", line 110: warning #225-D: function "htonl" declared implicitly
    "../main.c", line 111: warning #225-D: function "htons" declared implicitly
    "../main.c", line 113: error #71: incomplete type is not allowed
    "../main.c", line 115: warning #225-D: function "SNTP_start" declared implicitly
    "../main.c", line 128: warning #225-D: function "SNTP_forceTimeSync" declared implicitly
    8 errors detected in the compilation of "../main.c".
    gmake: *** [main.obj] Error 1
    gmake: Target 'all' not remade because of errors.
    **** Build Finished ****
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Piyush,

    Uncheck System Analyzer (UIA) 2.20.0.02 and SYS/BIOS 6.53.2.00. This are bundled into TI-RTOS already.

    Todd