Other Parts Discussed in Thread: SEGGER, CC3100
Having compiler errors when trying to integrate CC3100 into nrf52832 environment using Segger SES.
Had it working at one point after much work trying to get SL_FULL set so all the key simplelink related areas were not grayed out and caused not defined errors.
I thought all the flags were set in the user.h file and I tried many variants from just adding #define SL_FULL or #define SL_FULL 1 to adding SL_FULL in the SES project preprocessing directives.
I need to be able to use SmartConfig, AP Provisioning, Wlan Connect, and Sockets.
When I had it working I also added FS read/write and was able to send firmware update to CC3100 over SPI .
I am using CC3100 SDK 1.3.
Now after 6 hours of trying I can't get it to build because of the grayed out area that need to be included in the project.
The user.h key into is below :
#include <string.h>
#include "board.h"
#include "spi.h"
#include "wifi.h"
#include <stdint.h>
//#include "usart.h"
#define SL_FULL 
#define sl_FsOpen 
#define sl_FsWrite 
#define sl_FsClose 
#define sl_Write 
#define SL_PROTOCOL_TYPES 
#define sl_Socket 
#define sl_Connect 
#define netapp
#ifndef SL_IF_TYPE_UART
#include "spi.h"
#else
#include "uart.h"
#endif
#define _u8 unsigned char
 #define _i8 signed char
 #define _u16 unsigned short
 #define _i16 signed short
 #define _u32 unsigned long
 #define _i32 signed long
#define uint32_t UINT32
#define int32_t INT32
#define uint8_t UINT8
#define int8_t INT8
#define uint16_t UINT16
#define int16_t INT16
#define bool UINT8
 
 //typedef void (*P_EVENT_HANDLER)(void* pValue);
typedef P_EVENT_HANDLER SL_P_EVENT_HANDLER;
from simplelink.h
/*****************************************************************************/
/* Macro declarations for Host Driver version */
/*****************************************************************************/
#define SL_DRIVER_VERSION "1.0.1.11"
#define SL_MAJOR_VERSION_NUM 1L
#define SL_MINOR_VERSION_NUM 0L
#define SL_VERSION_NUM 1L
#define SL_SUB_VERSION_NUM 11L
/*****************************************************************************/
/* Macro declarations for predefined configurations */
/*****************************************************************************/
#ifdef SL_TINY
#undef SL_INC_ARG_CHECK
#undef SL_INC_EXT_API
#undef SL_INC_SOCK_SERVER_SIDE_API
#undef SL_INC_WLAN_PKG
#undef SL_INC_NET_CFG_PKG
#undef SL_INC_FS_PKG
#undef SL_INC_SET_UART_MODE
#undef SL_INC_NVMEM_PKG
#define SL_INC_STD_BSD_API_NAMING
#define SL_INC_SOCK_CLIENT_SIDE_API
#define SL_INC_SOCK_RECV_API
#define SL_INC_SOCK_SEND_API
#define SL_INC_SOCKET_PKG
#define SL_INC_NET_APP_PKG
#endif
#ifdef SL_SMALL
#undef SL_INC_EXT_API
#undef SL_INC_NET_APP_PKG
#undef SL_INC_NET_CFG_PKG
#undef SL_INC_FS_PKG
#define SL_INC_ARG_CHECK
#define SL_INC_WLAN_PKG
#define SL_INC_SOCKET_PKG
#define SL_INC_SOCK_CLIENT_SIDE_API
#define SL_INC_SOCK_SERVER_SIDE_API
#define SL_INC_SOCK_RECV_API
#define SL_INC_SOCK_SEND_API
#define SL_INC_SET_UART_MODE
#endif
#ifdef SL_FULL
#define SL_INC_EXT_API
#define SL_INC_NET_APP_PKG
#define SL_INC_NET_CFG_PKG
#define SL_INC_FS_PKG
#define SL_INC_ARG_CHECK
#define SL_INC_WLAN_PKG
#define SL_INC_SOCKET_PKG
#define SL_INC_SOCK_CLIENT_SIDE_API
#define SL_INC_SOCK_SERVER_SIDE_API
#define SL_INC_SOCK_RECV_API
#define SL_INC_SOCK_SEND_API
#define SL_INC_SET_UART_MODE
#endif
#define SL_RET_CODE_OK (0)
#define SL_RET_CODE_INVALID_INPUT (-2)
#define SL_RET_CODE_SELF_ERROR (-3)
#define SL_RET_CODE_NWP_IF_ERROR (-4)
#define SL_RET_CODE_MALLOC_ERROR (-5)
#define SL_RET_CODE_ABORT (-6)
#define SL_RET_CODE_PROTOCOL_ERROR (-7)
/* #define sl_Memcpy memcpy */
#define sl_Memset(addr, val, len) memset(addr, val, (size_t)len)
#define sl_Memcpy(dest, src, len) memcpy(dest, src, (size_t)len)
 
#ifndef SL_TINY_EXT
#define SL_MAX_SOCKETS (_u8)(8)
#else
#define SL_MAX_SOCKETS (_u8)(2)
#endif
/*****************************************************************************/
/* Types definitions */
/*****************************************************************************/
#ifndef NULL
#define NULL (0)
#endif
#ifndef FALSE
#define FALSE (0)
#endif
#ifndef TRUE
#define TRUE (!FALSE)
#endif
#ifndef OK
#define OK (0)
#endif
typedef _u16 _SlOpcode_t;
typedef _u8 _SlArgSize_t;
typedef _i16 _SlDataSize_t;
typedef _i16 _SlReturnVal_t;
/*
 * This event status used to block or continue the event propagation
 * through all the registered external libs/user application
 *
 */
typedef enum {
 EVENT_PROPAGATION_BLOCK = 0,
 EVENT_PROPAGATION_CONTINUE
} _SlEventPropogationStatus_e;
/*****************************************************************************/
/* Include files */
/*****************************************************************************/
/* 
 objInclusion.h and user.h must be included before all api header files 
 objInclusion.h must be the last arrangement just before including the API header files 
 since it based on the other configurations to decide which object should be included 
*/
#include "../source/objInclusion.h"
#include "trace.h"
#include "fs.h"
#include "socket.h"
#include "netapp.h"
#include "wlan.h"
#include "device.h"
#include "netcfg.h"
#include "wlan_rx_filters.h"
#define _SL_INCLUDE_FUNC(Name) (_SL_INC_##Name)
 /* The general events dispatcher which is
 * initialized to the user handler */
#ifdef sl_GeneralEvtHdlr
#define _SlDrvHandleGeneralEvents sl_GeneralEvtHdlr
#endif
/* The wlan events dispatcher which is
 * initialized to the user handler */
#ifdef sl_WlanEvtHdlr
#define _SlDrvHandleWlanEvents sl_WlanEvtHdlr
#endif
/* The NetApp events dispatcher which is
 * initialized to the user handler */
#ifdef sl_NetAppEvtHdlr
#define _SlDrvHandleNetAppEvents sl_NetAppEvtHdlr
#endif
/* The http server events dispatcher which is
 * initialized to the user handler if exists */
#ifdef sl_HttpServerCallback
#define _SlDrvHandleHttpServerEvents sl_HttpServerCallback
#endif
/* The socket events dispatcher which is
 * initialized to the user handler */
#ifdef sl_SockEvtHdlr
#define _SlDrvHandleSockEvents sl_SockEvtHdlr
#endif
#ifndef __CONCAT
#define __CONCAT(x,y) x ## y
#endif
#define __CONCAT2(x,y) __CONCAT(x,y)
/*
 * The section below handles the external lib event registration
 * according to the desired events it specified in its API header file.
 * The external lib should be first installed by the user (see user.h)
 */
#ifdef SL_EXT_LIB_1
/* General Event Registration */
 #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_GENERAL_EVENT)
 extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _GeneralEventHdl) (SlDeviceEvent_t *);
 #define SlExtLib1GeneralEventHandler __CONCAT2(SL_EXT_LIB_1, _GeneralEventHdl)
#undef EXT_LIB_REGISTERED_GENERAL_EVENTS
 #define EXT_LIB_REGISTERED_GENERAL_EVENTS
 #endif
/* Wlan Event Registration */
 #if __CONCAT2(SL_EXT_LIB_1, _NOTIFY_WLAN_EVENT)
 extern _SlEventPropogationStatus_e __CONCAT2(SL_EXT_LIB_1, _WlanEventHdl) (SlWlanEvent_t *);
 #define SlExtLib1WlanEventHandler __CONCAT2(SL_EXT_LIB_1, _WlanEventHdl)
#undef EXT_LIB_REGISTERED_WLAN_EVENTS
 #define EXT_LIB_REGISTERED_WLAN_EVENTS
 #endif
Then an example from fs.h down through error codes before getting to grayed out areas I need.
/*****************************************************************************/
/* Include files */
/*****************************************************************************/
#include "simplelink.h"
 
#ifndef __FS_H__
#define __FS_H__
#ifdef __cplusplus
extern "C" {
#endif
/*!
\addtogroup FileSystem
 @{
*/
/*****************************************************************************/
/* Macro declarations */
/*****************************************************************************/
/* FS error codes */
#define SL_FS_OK (0)
#define SL_FS_ERR_EMPTY_SFLASH (-67)
#define SL_FS_ERR_FILE_IS_NOT_SECURE_AND_SIGN (-66)
#define SL_FS_ERASING_FLASH (-65)
#define SL_FS_FILE_HAS_NOT_BEEN_CLOSE_CORRECTLY (-64)
#define SL_FS_WRONG_SIGNATURE (-63)
#define SL_FS_WRONG_SIGNATURE_OR_CERTIFIC_NAME_LENGTH (-62)
#define SL_FS_NOT_16_ALIGNED (-61)
#define SL_FS_CERT_CHAIN_ERROR (-60)
#define SL_FS_FILE_NAME_EXIST (-59)
#define SL_FS_SECURITY_BUF_ALREADY_ALLOC (-58)
#define SL_FS_SECURE_FILE_MUST_BE_COMMIT (-57)
#define SL_FS_ERR_INCORRECT_OFFSET_ALIGNMENT (-56)
#define SL_FS_ERR_FAILED_READ_NVMEM_HEADER (-55)
#define SL_FS_WRONG_FILE_NAME (-54)
#define SL_FS_FILE_SYSTEM_IS_LOCKED (-53)
#define SL_FS_SECURITY_ALLERT (-52)
#define SL_FS_FILE_UNVALID_FILE_SIZE (-51)
#define SL_FS_ERR_TOKEN_IS_NOT_VALID (-50)
#define SL_FS_NO_DEVICE_IS_LOADED (-49)
#define SL_FS_DATA_ADDRESS_SHOUD_BE_IN_DATA_RAM (-48)
#define SL_FS_DATA_IS_NOT_ALIGNED (-47)
#define SL_FS_ERR_OVERLAP_DETECTION_THRESHHOLD (-46)
#define SL_FS_FILE_HAS_RESERVED_NV_INDEX (-45)
#define SL_FS_ERR_MAX_FS_FILES_IS_LARGER (-44)
#define SL_FS_ERR_MAX_FS_FILES_IS_SMALLER (-43)
#define SL_FS_FILE_MAX_SIZE_EXCEEDED (-42)
#define SL_FS_INVALID_BUFFER_FOR_READ (-41)
#define SL_FS_INVALID_BUFFER_FOR_WRITE (-40)
#define SL_FS_ERR_FILE_IMAGE_IS_CORRUPTED (-39)
#define SL_FS_ERR_SIZE_OF_FILE_EXT_EXCEEDED (-38)
#define SL_FS_WARNING_FILE_NAME_NOT_KEPT (-37)
#define SL_FS_ERR_DEVICE_IS_NOT_FORMATTED (-36)
#define SL_FS_ERR_FAILED_WRITE_NVMEM_HEADER (-35)
#define SL_FS_ERR_NO_AVAILABLE_NV_INDEX (-34)
#define SL_FS_ERR_FAILED_TO_ALLOCATE_MEM (-33)
#define SL_FS_ERR_FAILED_TO_READ_INTEGRITY_HEADER_2 (-32)
#define SL_FS_ERR_FAILED_TO_READ_INTEGRITY_HEADER_1 (-31)
#define SL_FS_ERR_NO_AVAILABLE_BLOCKS (-30)
#define SL_FS_ERR_FILE_MAX_SIZE_BIGGER_THAN_EXISTING_FILE (-29)
#define SL_FS_ERR_FILE_EXISTS_ON_DIFFERENT_DEVICE_ID (-28)
#define SL_FS_ERR_INVALID_ACCESS_TYPE (-27)
#define SL_FS_ERR_FILE_ALREADY_EXISTS (-26)
#define SL_FS_ERR_PROGRAM (-25)
#define SL_FS_ERR_NO_ENTRIES_AVAILABLE (-24)
#define SL_FS_ERR_FILE_ACCESS_IS_DIFFERENT (-23)
#define SL_FS_ERR_BAD_FILE_MODE (-22)
#define SL_FS_ERR_FAILED_READ_NVFILE (-21)
#define SL_FS_ERR_FAILED_INIT_STORAGE (-20)
#define SL_FS_ERR_CONTINUE_WRITE_MUST_BE_MOD_4 (-19)
#define SL_FS_ERR_FAILED_LOAD_FILE (-18)
#define SL_FS_ERR_INVALID_HANDLE (-17)
#define SL_FS_ERR_FAILED_TO_WRITE (-16)
#define SL_FS_ERR_OFFSET_OUT_OF_RANGE (-15)
#define SL_FS_ERR_ALLOC (-14)
#define SL_FS_ERR_READ_DATA_LENGTH (-13)
#define SL_FS_ERR_INVALID_FILE_ID (-12)
#define SL_FS_ERR_FILE_NOT_EXISTS (-11)
#define SL_FS_ERR_EMPTY_ERROR (-10)
#define SL_FS_ERR_INVALID_ARGS (-9)
#define SL_FS_ERR_FAILED_TO_CREATE_FILE (-8)
#define SL_FS_ERR_FS_ALREADY_LOADED (-7)
#define SL_FS_ERR_UNKNOWN (-6)
#define SL_FS_ERR_FAILED_TO_CREATE_LOCK_OBJ (-5)
#define SL_FS_ERR_DEVICE_NOT_LOADED (-4)
#define SL_FS_ERR_INVALID_MAGIC_NUM (-3)
#define SL_FS_ERR_FAILED_TO_READ (-2)
#define SL_FS_ERR_NOT_SUPPORTED (-1)
/* end of error codes */
Then this is all grayed out and not defined to compiler.
#if _SL_INCLUDE_FUNC(sl_FsOpen)
_i32 sl_FsOpen(const _u8 *pFileName,const _u32 AccessModeAndMaxSize,_u32 *pToken,_i32 *pFileHandle);
#endif
/*!
 \brief close file in storage device
 
 \param[in] FileHdl Pointer to the file (assigned from sl_FsOpen) 
 \param[in] pCeritificateFileName Reserved for future use. Use NULL.
 \param[in] pSignature Reserved for future use. Use NULL.
 \param[in] SignatureLen Reserved for future use. Use 0.
\return On success, zero is returned. On error, an error code is returned 
 
 \sa sl_FsRead sl_FsWrite sl_FsOpen 
 \note Call the fs_Close with signature = 'A' signature len = 1 for activating an abort action
 \warning
 \par Example:
 \code 
 sl_FsClose(FileHandle,0,0,0);
 \endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsClose)
_i16 sl_FsClose(const _i32 FileHdl,const _u8* pCeritificateFileName,const _u8* pSignature,const _u32 SignatureLen);
#endif
/*!
 \brief Read block of data from a file in storage device
 
 \param[in] FileHdl Pointer to the file (assigned from sl_FsOpen) 
 \param[in] Offset Offset to specific read block
 \param[out] pData Pointer for the received data
 \param[in] Len Length of the received data
 
 \return On success, returns the number of read bytes. On error, negative number is returned 
 
 \sa sl_FsClose sl_FsWrite sl_FsOpen 
 \note belongs to \ref basic_api 
 \warning 
 \par Example:
 \code 
 Status = sl_FsRead(FileHandle, 0, &readBuff[0], readSize);
 \endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsRead)
_i32 sl_FsRead(const _i32 FileHdl,_u32 Offset ,_u8* pData,_u32 Len);
#endif
/*!
 \brief write block of data to a file in storage device
 
 \param[in] FileHdl Pointer to the file (assigned from sl_FsOpen) 
 \param[in] Offset Offset to specific block to be written
 \param[in] pData Pointer the transmitted data to the storage device
 \param[in] Len Length of the transmitted data
 
 \return On success, returns the number of written bytes. On error, an error code is returned
 
 \sa 
 \note belongs to \ref basic_api 
 \warning 
 \par Example:
 \code 
 Status = sl_FsWrite(FileHandle, 0, &buff[0], readSize);
 \endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsWrite)
_i32 sl_FsWrite(const _i32 FileHdl,_u32 Offset,_u8* pData,_u32 Len);
#endif
/*!
 \brief get info on a file
 
 \param[in] pFileName File name
 \param[in] Token Reserved for future use. Use 0
 \param[out] pFsFileInfo Returns the File's Information: flags,file size, allocated size and Tokens 
 
 \return On success, zero is returned. On error, an error code is returned 
 
 \sa sl_FsOpen 
 \note belongs to \ref basic_api 
 \warning 
 \par Example:
 \code 
 Status = sl_FsGetInfo("FileName.html",0,&FsFileInfo);
 \endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsGetInfo)
_i16 sl_FsGetInfo(const _u8 *pFileName,const _u32 Token,SlFsFileInfo_t* pFsFileInfo);
#endif
/*!
 \brief Delete specific file from a storage or all files from a storage (format)
 
 \param[in] pFileName File Name 
 \param[in] Token Reserved for future use. Use 0
 \return On success, zero is returned. On error, an error code is returned 
 
 \sa 
 \note belongs to \ref basic_api 
 \warning 
 \par Example:
 \code 
 Status = sl_FsDel("FileName.html",0);
 \endcode
*/
#if _SL_INCLUDE_FUNC(sl_FsDel)
_i16 sl_FsDel(const _u8 *pFileName,const _u32 Token);
#endif
/*!
 
				 
		 
        		 
					 
                          