Other Parts Discussed in Thread: CC3220S
Hello,
I am trying to get the ‘subscribe_publish_sample’ example project for Amazon Web Services (AWS) IoT up and running on a CC3220S LaunchPad board but have not been successful. After making some corrections to the code and project I was eventually able to get the example to build. However, the program fails at run-time somewhere inside the call to sl_Start() that occurs inside setStationMode(), of the module netwifi.c. The call to sl_Start() never returns.
Specifically I am building the FreeRTOS, GCC variation of the example, using CCS v7 as the IDE.
The example project is imported from the SimpleLink CC32XX SDK AWS IoT Plugin (aws_cc3220_1_00_00_12). I am using the SimpleLink SDK (simplelink_cc32xx_sdk_1_40_00_03) and FreeRTOSv9.0.0.
To get the project to build I needed to make the following corrections to the project and files.
In the file
${COM_TI_AWS_CC32XX_INSTALL_DIR}\source\ti\net\socket.h
fixed the paths to three header files and included two missing header files.
#elif defined(NET_SL)
#include <ti/drivers/net/wifi/simplelink.h>
#include <ti/drivers/net/wifi/bsd/sys/socket.h> /* SML - fixed path */
//#include <ti/drivers/net/wifi/sys/socket.h>
#include <ti/drivers/net/wifi/bsd/errno.h> /* SML - fixed path */
//#include <ti/drivers/net/wifi/sys/errno.h>
#include <ti/drivers/net/wifi/bsd/netdb.h> /* SML - fixed path */
//#include <ti/drivers/net/wifi/sys/netdb.h>
#include <ti\drivers\net\wifi\bsd\netinet\in.h> /* SML - included header file*/
#include <ti\drivers\net\wifi\bsd\arpa\inet.h> /* SML - included header file */
#elif defined(NET_NDK)
In the project linker file CC3220S_LAUNCHXL_FREERTOS.lds
Added the symbol _stack_end
.stack (NOLOAD) : ALIGN(0x8) {
_stack = .;
__stack = .;
_stack_end = __stack; /* Symbol required by FreeRTOS */
KEEP(*(.stack))
} > REGION_STACK AT> REGION_STACK
Finally, in the project settings (properties) for the linker (build->GNU Linker) it was necessary to remove the paths from the individual library options and add those paths to the Library search paths.
For example,
":${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}\source\ti\drivers\net\wifi\gcc\rtos\simplelink.a"
Changed to:
”:simplelink.a"
and then the following library search path added to the linker options:
"${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}\source\ti\drivers\net\wifi\gcc\rtos"
Has anyone been able to successfully run this AWS sample project. Can someone suggest why this example does not run?
Thank you,
Steve