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.

Errors: struct sockaddr_in.sin_len, GPIO_PIN_7 declaration

Other Parts Discussed in Thread: SYSBIOS

CCS: v6.0.1.0040

TI-RTOS: 2.10.01.38

NDK: 2.24.01.18

Hi,

Following the post at  I am having trouble porting my project from my old PC to the new one. The errors that are shooting up are described below:

OLD PC Configuration:

CCS: v6.0.1.0040

TI-RTOS: 2.01.00.03

NDK: 2.23.01.01

NEW PC Configuration:

CCS: v6.0.1.0040

TI-RTOS: 2.10.01.38

NDK: 2.24.01.18

ERROR 1:

CCS says there is no element named "sin_len" of structure "sockaddr_in". Is it that it was there in NDKv2.23.01.01 & removed in NDKv2.24.01.18? If yes, then how do I cater to the following code? The code segment is giving error that "sin1.sin_len" doesn't exist.

// Prepare address for connect
bzero( &sin1, sizeof(struct sockaddr_in) );
sin1.sin_family = AF_INET;
sin1.sin_len = sizeof( sin1 );
sin1.sin_addr.s_addr = inet_addr("182.18.175.43");//inet_addr("192.168.1.184");
sin1.sin_port = htons(80);//htons(7);
// Configure our Tx and Rx timeout to be 5 seconds
timeout.tv_sec = 5;
timeout.tv_usec = 0;
setsockopt( s, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof( timeout ) );
setsockopt( s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof( timeout ) );

 

ERROR 2:

The following mentioned C statements are giving error like "GPIO_PIN_7 not defined" etc etc. In the old PC these errors were not coming but in the new PC they are. The set of include files are also mentioned below.

Statements that are giving errors, errors related to their parameters (the constants) being undefined:

GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_0);
GPIOPinTypeQEI(GPIO_PORTL_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_1);
GPIOPinTypeQEI(GPIO_PORTL_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_2);
GPIOPinTypeQEI(GPIO_PORTL_BASE, GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3);
GPIOPadConfigSet(GPIO_PORTD_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPD);

THE INCLUDE(S):


/* XDCtools Header files */
#include <xdc/std.h>
#include <xdc/cfg/global.h>
#include <xdc/runtime/System.h>

#include <xdc/runtime/Error.h>


/* BIOS Header files */
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/fatfs/ff.h>
#include <ti/sysbios/knl/Clock.h>
#include <ti/sysbios/knl/Task.h>
//#include <ti/sysbios/knl/Load.h>
#include <ti/sysbios/smp/Load.h>

#include <ti/sysbios/knl/Mailbox.h>

#include <ti/sysbios/family/arm/m3/Hwi.h>

/* TI-RTOS Header files */
#include <ti/drivers/GPIO.h>
#include <ti/drivers/SDSPI.h>
#include <ti/drivers/USBMSCHFatFs.h>

#include <ti/drivers/UART.h>
#include <ti/drivers/I2C.h>
#include <ti/drivers/SPI.h>
#include <driverlib/sysctl.h>
#include <driverlib/eeprom.c>
#include <ti/drivers/EMAC.h>

//#include "html/oem_logo.h"
#include "html/banner.h"
#include "html/stylecss.h"

/* Example/Board Header files */
#include "Board.h"

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include <driverlib/hibernate.c>
#include <driverlib/hibernate.h>

// required for Hwi_disable() to work,
//but eventually discarded as it
//conflicts with device specific
//header file "ti/sysbios/family/arm/m3/Hwi.h"
//#include <ti/sysbios/hal/Hwi.h>

#include <inc/hw_gpio.h> // required for constants like GPIO_O_AFSEL, GPIO_O_CR, etc to work
#include <inc/hw_memmap.h> // required for constants like GPIO_PORTC_BASE, etc to work

#include <driverlib/pin_map.h>
#include "inc/hw_nvic.h"

#include <driverlib/qei.h>

// ethernet - start
#include "html/index.h"
#include "html/setTime.h"
#include <time.h>
#include <ti/ndk/inc/tools/cgiparse.h>
#include <ti/ndk/inc/tools/cgiparsem.h>

/* NDK Header files */
#include <ti/ndk/inc/netmain.h>
#include <ti/ndk/inc/_stack.h>
#include <ti/ndk/inc/nettools/netcfg.h>

PLEASE HELP.

Thanks

Regards

Soumyajit

  • Hi Soumyajit,

    Error 1:

    Yes, the sin_len field was removed from socket structs (see Release Notes). You can remove setting the sin_len in your code.

    Error 2: 

    For TI-RTOS 2.10.01.38, the GPIO macro definitions are in driverlib. Add the following include to your code.

    #include <driverlib/gpio.h>

  • Hi Vikram,

      Thanks for the info. Including <driverlib/gpio.h> resolved the issue but brought into light a lot of other errors. Is there any document or notes where I can get all the changes made from the old to new version of TI-RTOS, NDK applicable in my case? (the old & new versions that is applicable for me is mentioned in the first post of this thread)

       With reference to the Error List / Warning List screenshot provided below, I have the following queries:

    1. How do I resolve the issue of "Unresolved symbol" error in the error list?

    2. Invalid project path is reported in the warning list, but I find that the project path may be correct as per the version of products installed in my PC. How can I resolve the issue?

    3. Lot of warnings show field not supported & module deprecated, how do I resolve those?

    Regards

    Soumyajit

    -----------------------------------------------------------------

    Description Resource Path Location Type

    #188-D pointless comparison of unsigned integer with zero fatsdusbcopy.c /CSL8201_NIOT line 11631 C/C++ Problem

    #552-D variable "ret" was set but never used fatsdusbcopy.c /CSL8201_NIOT line 25767 C/C++ Problem

    unresolved symbol EK_TM4C1294XL_initGPIO, first referenced in ./fatsdusbcopy.obj CSL8201_NIOT C/C++ Problem

    unresolved symbol EK_TM4C1294XL_initEMAC, first referenced in ./fatsdusbcopy.obj CSL8201_NIOT C/C++ Problem

    ti.tirtos.TIRTOS : The EMAC module is deprecated. Please set ti.tirtos.TIRTOS.useEMAC to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 79 C/C++ Problem

    ti.tirtos.TIRTOS : The SDSPI module is deprecated. Please set ti.tirtos.TIRTOS.useSDSPI to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 99 C/C++ Problem

    unresolved symbol I2C_config, first referenced in C:\ti\tirtos_tivac_2_10_01_38\packages\ti\drivers\lib\drivers_tivaware.aem4f<I2C.oem4f> CSL8201_NIOT C/C++ Problem

    ti.tirtos.TIRTOS : The SPI module is deprecated. Please set ti.tirtos.TIRTOS.useSPI to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 106 C/C++ Problem

    unresolved symbol GPIO_config, first referenced in C:\ti\tirtos_tivac_2_10_01_38\packages\ti\drivers\lib\drivers_tivaware.aem4f<GPIOTiva.oem4f> CSL8201_NIOT C/C++ Problem

    unresolved symbol EK_TM4C1294XL_initUSBMSCHFatFs, first referenced in ./fatsdusbcopy.obj CSL8201_NIOT C/C++ Problem

    ti.tirtos.TIRTOS : The GPIO module is deprecated. Please set ti.tirtos.TIRTOS.useGPIO to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 84 C/C++ Problem

    unresolved symbol EK_TM4C1294XL_initSDSPI, first referenced in ./fatsdusbcopy.obj CSL8201_NIOT C/C++ Problem

    ti.tirtos.TIRTOS : The I2C module is deprecated. Please set ti.tirtos.TIRTOS.useI2C to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 89 C/C++ Problem

    Invalid project path: Include path not found (C:\ti\tirtos_tivac_2_10_01_38\products\uia_2_00_01_34\packages). CSL8201_NIOT pathentry Path Entry Problem

    Invalid project path: Include path not found (C:\ti\tirtos_tivac_2_10_01_38\products\ndk_2_23_01_01\packages). CSL8201_NIOT pathentry Path Entry Problem

    Invalid project path: Include path not found (C:\ti\tirtos_tivac_2_10_01_38\products\bios_6_40_03_39\packages). CSL8201_NIOT pathentry Path Entry Problem

    unresolved symbol SPI_config, first referenced in C:\ti\tirtos_tivac_2_10_01_38\packages\ti\drivers\lib\drivers_tivaware.aem4f<SPI.oem4f> CSL8201_NIOT C/C++ Problem

    ti.drivers.GPIO : Setting the GPIO.libType field is no longer supported. Please use the ti.tirtos.TIRTOS.libType field to enable/disable logging and assert checking. .xdchelp /CSL8201_NIOT line 44 C/C++ Problem

    <a href="file:/c:/ti/ccsv6/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain CSL8201_NIOT C/C++ Problem

    ti.drivers.EMAC : Setting the EMAC.libType field is no longer supported. Please use the ti.tirtos.TIRTOS.libType field to enable/disable logging and assert checking. .xdchelp /CSL8201_NIOT line 44 C/C++ Problem

    ti.tirtos.TIRTOS : The USBMSCHFatFs module is deprecated. Please set ti.tirtos.TIRTOS.useUSBMSCHFatFs to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 117 C/C++ Problem

    unresolved symbol NIMUDeviceTable, first referenced in C:\ti\tirtos_tivac_2_10_01_38\products\ndk_2_24_01_18\packages\ti\ndk\stack\lib\stk.aem4f<nimu.oem4f> CSL8201_NIOT C/C++ Problem

    ti.tirtos.TIRTOS : The UART module is deprecated. Please set ti.tirtos.TIRTOS.useUART to true in the .cfg instead (via graphical tool or text editor). .xdchelp /CSL8201_NIOT line 112 C/C++ Problem

    unresolved symbol SDSPI_config, first referenced in C:\ti\tirtos_tivac_2_10_01_38\packages\ti\drivers\lib\drivers_tivaware.aem4f<SDSPI.oem4f> CSL8201_NIOT C/C++ Problem

    ti.drivers.USBMSCHFatFs : Setting the USBMSCHFatFs.libType field is no longer supported. Please use the ti.tirtos.TIRTOS.libType field to enable/disable logging and assert checking. .xdchelp /CSL8201_NIOT line 49 C/C++ Problem

    ti.drivers.UART : Setting the UART.libType field is no longer supported. Please use the ti.tirtos.TIRTOS.libType field to enable/disable logging and assert checking. .xdchelp /CSL8201_NIOT line 51 C/C++ Problem

    #10010 errors encountered during linking; "CSL8201_NIOT.out" not built CSL8201_NIOT C/C++ Problem

    ti.drivers.SPI : Setting the SPI.libType field is no longer supported. Please use the ti.tirtos.TIRTOS.libType field to enable/disable logging and assert checking. .xdchelp /CSL8201_NIOT line 51 C/C++ Problem

    ti.drivers.SDSPI : Setting the SDSPI.libType field is no longer supported. Please use the ti.tirtos.TIRTOS.libType field to enable/disable logging and assert checking. .xdchelp /CSL8201_NIOT line 55 C/C++ Problem

  • Hi Soumyajit,

    The release notes document the changes made in a particular release.

    Regarding the errors:

    1) I believe the board files changed in the TI-RTOS 2.10. Can you please compare your current board files with the board files in TI-RTOS 2.10 (Easiest  way is to create an example project for 2.10 to get the board files).

    2) I don't know about the project path warning. The only thing I can suggest is to clean and build project. Sometimes, there are build artifacts from the previous product which need to be cleaned.

    3) For the field not supported and module deprecated warnings. Can you compare your application .cfg with an TI-RTOS 2.10 example .cfg? The TI-RTOS configuration has undergone some changes. For example:

    Instead of the following configuration:

    var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
    var EMAC = xdc.useModule('ti.drivers.EMAC');
    EMAC.libType = EMAC.LibType_NonInstrumented;
    var GPIO= xdc.useModule('ti.drivers.GPIO');
    GPIO.libType = EMAC.LibType_NonInstrumented;
    

    Use the following configuration:

    var TIRTOS = xdc.useModule('ti.tirtos.TIRTOS');
    TIRTOS.useEMAC = true;
    TIRTOS.useGPIO = true;

    Vikram

  • Hi Vikram,
        Thanks for all your help. According to me, the changes made are significant & very difficult for me to implement in my existing project (mainly due to time constrain). The easiest solution I used is that I downloaded the old TI-RTOS version file from ti.com & installed in the new PC & it worked.

    Thanks

    Regards
    Soumyajit