【CC3200 评测】CC3200-LAUNCHXL开发板使用心得分享+使用simplelink的库遇到问题

1.用gcc编译simplelink下面的源码,生成libsimplelink.a的库,然后再编译example下面的getting_started_with_wlan_ap,生成wlan_ap.bin,用uniflash烧写到SPI FLASH运行,总是出现如下错误,然后就结束了。

*************************************************
CC3200 WLAN AP Application
*************************************************

[GENERAL EVENT] - ID=[0] Sender=[0]

Error [-100] at line [527] in function [ConfigureSimpleLinkToDefaultState]

查了一下源码:

是在ConfigureSimpleLinkToDefaultState()这个函数里面的lMode = sl_Start(0, 0, 0);返回错误,一直跟下去,发现是在

_SlReturnVal_t _SlDrvSyncObjWaitTimeout(_SlSyncObj_t *pSyncObj, _u32 timeoutVal, SlDriverAPIWithTimeout_e apiIdx)
{
_SlReturnVal_t ret = sl_SyncObjWait(pSyncObj, timeoutVal);

/* if timeout occured...*/
if (ret)
{
_SlDriverHandleError(SL_DEVICE_DRIVER_TIMEOUT_ASYNC_EVENT, apiIdx, timeoutVal);
}
else if (g_bDeviceRestartIsRequired == TRUE)
{
return SL_API_ABORTED;
}

return SL_RET_CODE_OK;
}

这个函数的sl_SyncObjWait接口出错了,走到了这个分支return SL_API_ABORTED;

#define SL_API_ABORTED      (-100)

simplelink用的是OS的版本。

后来,看了simiplelink的user guide,

The available sets are:

  1. SL_TINY - Compatible to be used on platforms with very limited resources. Provides the best in class foot print in terms of Code and Data consumption.
  2. SL_SMALL - Compatible to most common networking applications. Provide the most common APIs with decent balance between code size, data size, functionality and performances
  3. SL_FULL - Provide access to all SimpleLink functionalities

自己定义了这个宏:

#define SL_SMALL

但是还是不行,出现同样的错误,请TI的工程师帮忙分析解决一下,谢谢。

14 个回复