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/CC3220MOD: undefined symbol

Part Number: CC3220MOD
Other Parts Discussed in Thread: SYSBIOS, CC3220SF

Tool/software: TI C/C++ Compiler

Hello,

I have extended the example by a Wlan AP. When I debug this then the console show me that sl_start, sl_stop,… are undefined. Although I inserted the simplelink.h. Who can I solve this errors?

C – Code

/*

* ======== main_tirtos.c ========

*/

#include <stdint.h>

//#include <string.h>

 

/* POSIX Header files */

#include <pthread.h>

 

/* RTOS header files */

#include <ti/sysbios/BIOS.h>

 

/* TI-DRIVERS Header files*/

#include <ti/drivers/net/wifi/simplelink.h>

#ifdef CC32XX

#include <ti/drivers/Power.h>

#include <ti/drivers/power/PowerCC32XX.h>

#endif

 

#include <ti/drivers/net/wifi/wlan.h>

 

 

 

/* Example/Board Header files */

#include "Board.h"

 

 

void *mainThread(void *arg0);

 

void Wlan_Init(void);

 

/* Stack size in bytes */

#define THREADSTACKSIZE   1024

 

 

 

 

 

/*

* ======== main ========

*/

int main(void)

{

   pthread_t           thread;

   pthread_attr_t     attrs;

   struct sched_param priParam;

   int                retc;

 

 

   /* Call driver init functions */

 

     Board_init();

 

 

   /* 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) {}

   }

 

   retc = pthread_create(&thread, &attrs, mainThread, NULL);

   if (retc != 0) {

       /* pthread_create() failed */

       while (1) {}

   }

 

 

   Wlan_Init();

   BIOS_start();

 

   return (0);

}

 

void Wlan_Init(void)

{

 

 

 

   _u8 ssid[] = "test";

   _u8 channel[] = "6";

   _u8 Security_Type[] = "SL_WLAN_SEC_TYPE_WPA_WPA2";

   _u8 Password[] = "12345";

   _u8 Anzahl_Stationsverbindungen[] ="2";

   _u8 Power[] ="5";

   _u8 Country[] ="EU";

 

   sl_WlanSetMode(ROLE_AP);

   sl_Stop(0);

   sl_Start(NULL,NULL,NULL);

 

 

   sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_SSID, strlen((const char *)(ssid)), (unsigned char*)ssid);

   sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_SECURITY_TYPE, 1,(unsigned char *)(Security_Type));

   sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_PASSWORD,sizeof(Password),(unsigned char *)(Password));

   sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_CHANNEL,sizeof(channel), (unsigned char *)(channel));

   sl_WlanSet(SL_WLAN_CFG_AP_ID, SL_WLAN_AP_OPT_MAX_STATIONS,sizeof(Anzahl_Stationsverbindungen),(unsigned char *)(Anzahl_Stationsverbindungen));

   sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,SL_WLAN_GENERAL_PARAM_OPT_AP_TX_POWER,1,(unsigned char *)(Power));

   sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID, SL_WLAN_GENERAL_PARAM_OPT_COUNTRY_CODE, 2, Country);

 

   SlNetCfgIpV4Args_t ipV4;

 

   ipV4.Ip= (_u32)SL_IPV4_VAL(10,1,1,201);/* IP address*/

   ipV4.IpMask= (_u32)SL_IPV4_VAL(255,255,255,0);/* Subnetmask*/

   ipV4.IpGateway= (_u32)SL_IPV4_VAL(10,1,1,1);/* Defaultgatewayaddress*/

   ipV4.IpDnsServer= (_u32)SL_IPV4_VAL(8,16,32,64);/* _u32DNS serveraddress*/

 

   sl_NetCfgSet(SL_NETCFG_IPV4_AP_ADDR_MODE,SL_NETCFG_ADDR_STATIC,sizeof(SlNetCfgIpV4Args_t),(_u8*)&ipV4);

   sl_Stop(0);

   sl_Start (NULL,NULL,NULL);

 

 

}

 

 

Console

 

**** Build of configuration Debug for project Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2 ****

 

"C:\\ti\\ccsv8\\utils\\bin\\gmake" -k -j 4 all -O

Building file: "../gpiointerrupt.c"

Invoking: ARM Compiler

"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --include_path="C:/ti/simplelink_cc32xx_sdk_2_40_02_00/source" --include_path="C:/ti/simplelink_cc32xx_sdk_2_40_02_00/kernel/tirtos/packages" --include_path="C:/ti/simplelink_cc32xx_sdk_2_40_02_00/source/ti/posix/ccs" --include_path="C:/ti/simplelink_cc32xx_sdk_2_40_02_00/source/ti/posix/ccs" --include_path="C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/include" --include_path="S:/M/WIFI/Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2" --define=CC32XX -g --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on --preproc_with_compile --preproc_dependency="gpiointerrupt.d_raw" --cmd_file="S:/M/WIFI/test_tirtos_builds_CC3220SF_LAUNCHXL_debug_ccs/Debug/configPkg/compiler.opt" "../gpiointerrupt.c"

Finished building: "../gpiointerrupt.c"

Building target: "Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2.out"

Invoking: ARM Linker

"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/bin/armcl" -mv7M4 --code_state=16 --float_support=vfplib -me --define=CC32XX -g --diag_warning=225 --diag_warning=255 --diag_wrap=off --display_error_number --gen_func_subsections=on -z -m"Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2.map" -i"C:/ti/simplelink_cc32xx_sdk_2_40_02_00/source/ti/drivers/net/wifi" -i"C:/ti/simplelink_cc32xx_sdk_2_40_02_00/source" -i"C:/ti/simplelink_cc32xx_sdk_2_40_02_00/kernel/tirtos/packages" -i"C:/ti/ccsv8/tools/compiler/ti-cgt-arm_18.1.5.LTS/lib" --diag_wrap=off --display_error_number --warn_sections --xml_link_info="Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2_linkInfo.xml" --rom_model -o "Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2.out" "./CC3220SF_LAUNCHXL.obj" "./gpiointerrupt.obj" "./main_tirtos.obj" "../CC3220SF_LAUNCHXL_TIRTOS.cmd" -l"ti/display/lib/display.aem4" -l"ti/grlib/lib/ccs/m4/grlib.a" -l"third_party/spiffs/lib/ccs/m4/spiffs.a" -l"ti/drivers/lib/drivers_cc32xx.aem4" -l"third_party/fatfs/lib/ccs/m4/fatfs.a" -l"ti/dpl/lib/dpl_cc32xx.aem4" -l"S:/M/WIFI/test_tirtos_builds_CC3220SF_LAUNCHXL_debug_ccs/Debug/configPkg/linker.cmd" -l"ti/devices/cc32xx/driverlib/ccs/Release/driverlib.a" -llibc.a

<Linking>

undefined     first referenced

symbol           in file    

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

sl_NetCfgSet   ./main_tirtos.obj

sl_Start       ./main_tirtos.obj

sl_Stop       ./main_tirtos.obj

sl_WlanSet     ./main_tirtos.obj

sl_WlanSetMode ./main_tirtos.obj

error #10234-D: unresolved symbols remain

error #10010: errors encountered during linking; "Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2.out" not built

>> Compilation failure

makefile:155: recipe for target 'Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2.out' failed

gmake[1]: *** [Sender2_CC3220SF_LAUNCHXL_tirtos_ccs2.out] Error 1

gmake: *** [all] Error 2

makefile:148: recipe for target 'all' failed

 

**** Build Finished ****