Other Parts Discussed in Thread: CC3220SF, CC3220S
Dear TI,
I am using the thermostat code as reference because of the OTA, MQTT (without AWS though) and provisioning functionality. I integrated my own application inside of it and removed all other code parts (sensors, BLE, touch) but so far I have failed to compile the project succesfuly.
There are basically 2 problems that occur.
(1) My project is GCC based, because my own application was ported from another microcontroller. Normally this is not a problem, but I found out that the OTA folder ( {SIMPLELINK SDK PATH}/source/ti/net/ota ) only contains a CCS example. When I use this example in my project, I get several warnings because the CCS compiler is used instead of GCC. Of course I could try to change the compiler to GCC myself, but my current project has include/linking problems (described as second problem) so I don't want to mix these issues at the same time.
Description Resource Path Location Type {SDK ROOT}/source/ti/net/ota/ccs/Release/ota.a(CdnClient.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail my_app_CC3220SF_LAUNCHXL_tirtos_gcc C/C++ Problem {SDK_ROOT}/source/ti/net/ota/ccs/Release/ota.a(CdnDropboxV2.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail my_app_CC3220SF_LAUNCHXL_tirtos_gcc C/C++ Problem {SDK_ROOT}/source/ti/net/ota/ccs/Release/ota.a(OtaArchive.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail my_app_CC3220SF_LAUNCHXL_tirtos_gcc C/C++ Problem {SDK_ROOT}/source/ti/net/ota/ccs/Release/ota.a(OtaHttpClient.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail my_app_CC3220SF_LAUNCHXL_tirtos_gcc C/C++ Problem {SDK_ROOT}/source/ti/net/ota/ccs/Release/ota.a(OtaJson.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail my_app_CC3220SF_LAUNCHXL_tirtos_gcc C/C++ Problem {SDK ROOT}/source/ti/net/ota/ccs/Release/ota.a(OtaLib.obj) uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail my_app_CC3220SF_LAUNCHXL_tirtos_gcc C/C++ Problem
(2) The second problem that I have, is that the following errors occur when compiling clock_sync.c from the SDK.
{SDK_ROOT}/source/ti/net/utils/gcc/Release/net_utils.a(clock_sync.obj): In function `ClockSync_mutexLock': /vagrant/Q1_26_3_2019/sdk_root/source/ti/net/utils/clock_sync.c:113: undefined reference to `MutexP_create' /vagrant/Q1_26_3_2019/sdk_root/source/ti/net/utils/clock_sync.c:119: undefined reference to `MutexP_lock' {SDK_ROOT}/source/ti/net/utils/gcc/Release/net_utils.a(clock_sync.obj): In function `ClockSync_mutexUnlock': /vagrant/Q1_26_3_2019/sdk_root/source/ti/net/utils/clock_sync.c:134: undefined reference to `MutexP_unlock'
I noticed that I I add ${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/kernel/tirtos/packages/ti/dpl/package/lib/lib/dpl_cc32xx/MutexP_tirtos.om4g to the linking path, the errors would disappear. I am, however, slightly confused by all the different types of lib extensions (for example .oem4/.om4g/.orm4 or .aem4/.am4g/.arm4), and the difference between gcc/Release and gcc/Debug links in the SDK. Currently I am just doing it based on trial-and-error, but I would like to understand what I am doing. Furthermore, I have added the more general/'umbrella' library ${COM_TI_SIMPLELINK_CC32XX_SDK_INSTALL_DIR}/kernel/tirtos/packages/ti/dpl/lib/dpl_cc32xx.am4g to the project, so I would assume that would normally include the MutexP functions.
Best regards,
MJ