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.

CCS/CC3200MOD: Portable + Wi-Fi, unresolved symbol SlNetIf_add, first referenced in ./httpserver.obj

Part Number: CC3200MOD
Other Parts Discussed in Thread: CC3220SF

Tool/software: Code Composer Studio

I have a CC3220SF Launchpad and am working through the example on adding http server to the portable example.

I have followed the steps here:  http://dev.ti.com/tirex/explore/node?node=ADEhJZXpIbgto5nkF.NeGg__fc2e6sr__2.10.00.04

As I modified the example per these instructions to add the http server I often rebuilt the project and only at step 6 Add TI-RTOS threads have I run into a problem.

I get the build error: unresolved symbol SlNetIf_add, first referenced in ./httpserver.obj

The code in httpserver.c at   /* Initialize SlNetSock layer with CC3x20 interface    causes the problem.
Screen shot of problem.

It is unexpected that the error reports unresolved but when I place cursor over the function the IDE expands the function.

With the IDE, I can open the deceleration which I find in the file slnetif.h.

  • Here is full code of main_tirtos.c

    This builds but If I un-comment lines 147 to 155 I get the error.

    /*
     * Copyright (c) 2016-2018, Texas Instruments Incorporated
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions
     * are met:
     *
     * *  Redistributions of source code must retain the above copyright
     *    notice, this list of conditions and the following disclaimer.
     *
     * *  Redistributions in binary form must reproduce the above copyright
     *    notice, this list of conditions and the following disclaimer in the
     *    documentation and/or other materials provided with the distribution.
     *
     * *  Neither the name of Texas Instruments Incorporated nor the names of
     *    its contributors may be used to endorse or promote products derived
     *    from this software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
     * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
     * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
     * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
     * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
    
     * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
     * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     */
    
    /*
     *  ======== main_tirtos.c ========
     */
    #include <stdint.h>
    
    /* POSIX Header files */
    #include <pthread.h>
    
    /* RTOS header files */
    #include <ti/sysbios/BIOS.h>
    
    /* Driver header files */
    #include <ti/drivers/GPIO.h>
    
    /* Example/Board Header files */
    #include "Board.h"
    
    /* Files for SimpleLink WiFi start up, SPI (for temperature) and UART for terminal commands */
     #include <ti/drivers/net/wifi/simplelink.h>
     #include <ti/drivers/SPI.h>
     #include <uart_term.h>
    
    /* Mutex to protect the reading/writing of the temperature variables */
    pthread_mutex_t temperatureMutex;
    
    /* Our Threads */
    extern void *temperatureThread(void *arg0);
    extern void *consoleThread(void *arg0);
    extern void *httpserverThread(void *arg0);
    
    /* Stack size in bytes. Large enough in case debug kernel is used. */
    #define THREADSTACKSIZE    1024
    #define HTTP_STACK_SIZE         (3072)
    #define SL_TASK_STACK_SIZE      (2048)
    
    /*
     *  ======== main ========
     */
    int main(void)
    {
        pthread_t           thread;
        pthread_attr_t      attrs;
        struct sched_param  priParam;
        int                 retc;
    
        pthread_t           spawnThread;
        pthread_attr_t      attrs_spawn;
    
        /* Call driver init functions */
        Board_initGeneral();
    
        SPI_init();
        InitTerm();
    
        /* Initialize the attributes structure with default values */
        pthread_attr_init(&attrs);
    
        /* Set priority, detach state, and stack size attributes */
        priParam.sched_priority = 1;
        retc = pthread_attr_setschedparam(&attrs, &priParam);
        retc |= pthread_attr_setdetachstate(&attrs, PTHREAD_CREATE_DETACHED);
        retc |= pthread_attr_setstacksize(&attrs, THREADSTACKSIZE);
        if (retc != 0) {
            /* failed to set attributes */
            while (1) {}
        }
    
        /* Console thread */
    //    retc = pthread_create(&thread, &attrs, consoleThread, NULL);
    //    if (retc != 0) {
    //        /* pthread_create() failed */
    //        while (1) {}
    //    }
    
        /*
         *  Let's make the temperature thread a higher priority .
         *  Higher number means higher priority in TI-RTOS.
         */
        priParam.sched_priority = 2;
        retc = pthread_attr_setschedparam(&attrs, &priParam);
        if (retc != 0) {
            /* failed to set priority */
            while (1) {}
        }
    
        retc = pthread_create(&thread, &attrs, temperatureThread, NULL);
        if (retc != 0) {
            /* pthread_create() failed */
            while (1) {}
        }
    
        /* Create a mutex that will protect temperature variables */
        retc = pthread_mutex_init(&temperatureMutex, NULL);
        if (retc != 0) {
            /* pthread_mutex_init() failed */
            while (1) {}
        }
    
        /* create the sl_Task */
        pthread_attr_init(&attrs_spawn);
        priParam.sched_priority = 9;
        retc = pthread_attr_setschedparam(&attrs_spawn, &priParam);
        retc |= pthread_attr_setstacksize(&attrs_spawn, SL_TASK_STACK_SIZE);
    
        retc = pthread_create(&spawnThread, &attrs_spawn, sl_Task, NULL);
        if(retc)
        {
            /* Handle Error */
            UART_PRINT("Unable to create sl_Task thread \n");
            while(1);
        }
    
        /* HTTP Server thread */
    //    priParam.sched_priority = 3;
    //    pthread_attr_setschedparam(&attrs, &priParam);
    //    retc |= pthread_attr_setstacksize(&attrs, HTTP_STACK_SIZE);
    //
    //    retc = pthread_create(&thread, &attrs, httpserverThread, NULL);
    //    if (retc != 0) {
    //        /* pthread_create() failed */
    //        while (1);
    //    }
    
        /* Initialize the GPIO since multiple threads are using it */
        GPIO_init();
    
        /* Start the TI-RTOS scheduler */
        BIOS_start();
    
        return (0);
    }
    
  • I exported the project and attached here.

    <?xml version="1.0" encoding="UTF-8"?>
    <cdtprojectproperties>
    <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.IncludePaths">
    <language name="C Source File">
    <includepath>Debug/${INHERITED_INCLUDE_PATH}</includepath>
    <includepath>C:/ST365/ST365_R1_SVN/trunk/Firmware/portable_CC3220SF_LAUNCHXL_tirtos_ccs</includepath>
    <includepath>C:/ti/simplelink_cc32xx_sdk_2_20_00_10/source/ti/posix/ccs</includepath>
    <includepath>C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.12.1.LTS/include</includepath>
    
    </language>
    <language name="Assembly Source File">
    <includepath>Debug/${INHERITED_INCLUDE_PATH}</includepath>
    <includepath>C:/ST365/ST365_R1_SVN/trunk/Firmware/portable_CC3220SF_LAUNCHXL_tirtos_ccs</includepath>
    <includepath>C:/ti/simplelink_cc32xx_sdk_2_20_00_10/source/ti/posix/ccs</includepath>
    <includepath>C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.12.1.LTS/include</includepath>
    
    </language>
    <language name="C++ Source File">
    <includepath>Debug/${INHERITED_INCLUDE_PATH}</includepath>
    <includepath>C:/ST365/ST365_R1_SVN/trunk/Firmware/portable_CC3220SF_LAUNCHXL_tirtos_ccs</includepath>
    <includepath>C:/ti/simplelink_cc32xx_sdk_2_20_00_10/source/ti/posix/ccs</includepath>
    <includepath>C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.12.1.LTS/include</includepath>
    
    </language>
    <language name="Assembly Source File">
    <includepath>Debug/${INHERITED_INCLUDE_PATH}</includepath>
    <includepath>C:/ST365/ST365_R1_SVN/trunk/Firmware/portable_CC3220SF_LAUNCHXL_tirtos_ccs</includepath>
    <includepath>C:/ti/simplelink_cc32xx_sdk_2_20_00_10/source/ti/posix/ccs</includepath>
    <includepath>C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.12.1.LTS/include</includepath>
    
    </language>
    <language name="Linker Command File">
    
    </language>
    <language name="Linker Command File">
    
    </language>
    <language name="Linker Command File">
    
    </language>
    </section>
    <section name="org.eclipse.cdt.internal.ui.wizards.settingswizards.Macros">
    <language name="C Source File">
    <macro>
    <name>${INHERITED_SYMBOLS}</name><value/>
    </macro>
    <macro>
    <name>CC32XX</name><value/>
    </macro>
    <macro>
    <name>ONBOARD_TMP006</name><value/>
    </macro>
    
    </language>
    <language name="Assembly Source File">
    <macro>
    <name>${INHERITED_SYMBOLS}</name><value/>
    </macro>
    <macro>
    <name>CC32XX</name><value/>
    </macro>
    <macro>
    <name>ONBOARD_TMP006</name><value/>
    </macro>
    
    </language>
    <language name="C++ Source File">
    <macro>
    <name>${INHERITED_SYMBOLS}</name><value/>
    </macro>
    <macro>
    <name>CC32XX</name><value/>
    </macro>
    <macro>
    <name>ONBOARD_TMP006</name><value/>
    </macro>
    
    </language>
    <language name="Assembly Source File">
    <macro>
    <name>${INHERITED_SYMBOLS}</name><value/>
    </macro>
    <macro>
    <name>CC32XX</name><value/>
    </macro>
    <macro>
    <name>ONBOARD_TMP006</name><value/>
    </macro>
    
    </language>
    <language name="Linker Command File">
    
    </language>
    <language name="Linker Command File">
    
    </language>
    <language name="Linker Command File">
    
    </language>
    </section>
    </cdtprojectproperties>
    

  • Hi Forrest,

    The link you sent includes instructions and source code for the 2.10 SDK. What SDK version are you using?

    For reference, the latest link to this training is available here: http://dev.ti.com/tirex/explore/node?node=AHfto9f3C1hke4S8NSYRXQ__fc2e6sr__LATEST

    Unresolved symbol errors typically mean a library is missing or out-of-date, so please verify your SDK version matches and be sure that you have all of the libraries added from task 2 step 1 of the training.

    Best regards,

    Sarah

  • Sarah,

    I will check the exact version when I am back at work tomorrow, but I think it is something with a .30. in the file name and is the most recent as of about last summer. 

    If the SKD has changed so much that the instructions are wrong for the current SDK the web page should be changed to indicate which version SDK it applies to and a link added to down load that exact version should get added too.

    FYI, I was not thinking it was a version problem but something in my IDE .  But even more puzzling is that the build fails with an unresolved symbol, but yet the IDE can open a deceleration to the same symbol.   It is almost as if I am misunderstanding the error or something.

    Thanks,

  • Sarah,


    Regarding, "Unresolved symbol errors typically mean a library is missing...."  you got it. That was my problem. Although I did the step (task 2 step 1) to add the libraries they were not there this morning when I opened up the IDE.

    I added them and can now build the project.

    I will mark this resolved.

    1000 Thanks,