Other Parts Discussed in Thread: CC3235SF
Hi,
I am working on the OTA update and was looking into mqtt_client demo from the 6.10 SimpleLink SDK. I have imported the project, enabled:
#define INTERNAL_UPDATE_SUPPORT (1)
... built the project and loaded SLI image onto the development board. After a bit of debugging by adding LOG_INFO() calls in different places around the code I was able to establish that code gets stuck in reading the version from the ota.dat file in here:
int OTA_IF_getCurrentVersion(uint8_t *pVersion) { int16_t rc = SL_ERROR_BSD_EINVAL; if(pVersion) { rc = FILE_read((int8_t*)"ota.dat", OTA_VERSION_LEN, pVersion, 0); if(rc < 0) { memset(pVersion, '0', OTA_VERSION_LEN); rc = FILE_write("ota.dat", OTA_VERSION_LEN, (uint8_t*)pVersion, NULL, SL_FS_CREATE_FAILSAFE); if (rc < 0) while(1) // HERE THE CODE GETS STUCK ; } } LOG_ERROR_IF_NEG(rc, "FILE_read failed"); return rc; }
When I check image.syscfg file under CCS the ota.dat file is listed over there. What might be causing this problem? What is the solution?
Kind regard,
Mike