Hello,
I have a CC3200 with 16MB of SFlash attached and I'm trying to get OTA updates working with it but I have problems when trying to OTA update files that are larger than 190KB.
The problem file is 372KB in size and in my Uniflash configuration I set it's Max Size to 1040384. The file that the OTA keeps failing on is /www/app.min.js. All the other files are much smaller, the next biggest being 171K.
This is the file system on the CC3200 after Format, Service Pack Program, and Program Uniflash operations:
[13:51:48] INFO: > Executing Operation: ListFileSystem [13:51:48] INFO: extracting file system information... [13:51:49] INFO: Serial Flash block size: 4096 bytes [13:51:49] INFO: Serial Flash capacity: 4096 blocks [13:51:49] INFO: file start size fail total size filename [13:51:49] INFO: index block [BLKs] safe [BLKs] [13:51:49] INFO: ---------------------------------------------------------------------------- [13:51:49] INFO: N/A 0 5 N/A 5 FATFS [13:51:49] INFO: 0 71 4 no 4 /sys/mcuimg.bin [13:51:49] INFO: 4 5 33 yes 66 /sys/servicepack.ucf [13:51:49] INFO: 6 75 1 yes 2 /sys/mode.cfg [13:51:49] INFO: 7 77 1 yes 2 /sys/ipcfg.ini [13:51:49] INFO: 8 79 1 yes 2 /sys/ap.cfg [13:51:49] INFO: 9 81 1 yes 2 /sys/devname.cfg [13:51:49] INFO: 10 83 1 yes 2 /sys/dhcpsrv.cfg [13:51:49] INFO: 11 85 1 yes 2 /sys/httpsrv.cfg [13:51:49] INFO: 12 87 2 yes 4 /sys/pref.net [13:51:49] INFO: 13 91 1 yes 2 /sys/stacfg.ini [13:51:49] INFO: 14 93 1 yes 2 /sys/pmcfg.ini [13:51:49] INFO: 15 95 255 no 255 /www/index.html [13:51:49] INFO: 16 350 255 no 255 /www/dashboard.html [13:51:49] INFO: 17 605 255 no 255 /www/app.min.js [13:51:49] INFO: 18 860 255 no 255 /www/app.min.css [13:51:49] INFO: 19 1115 2 no 2 /www/device.json [13:51:49] INFO: 20 1117 2 no 2 /www/gateruntimedata.json [13:51:49] INFO: 21 1119 17 no 17 /www/gatessetupdef.xml [13:51:49] INFO: 22 1136 2 no 2 /www/network.json [13:51:49] INFO: 23 1138 9 no 9 /www/nxtsetupdef.xml [13:51:49] INFO: 24 1147 2 no 2 /www/singlegatefullruntimedata.json [13:51:49] INFO: 26 1149 2 no 2 /www/singlegategatedriversettings.json [13:51:49] INFO: 27 1151 2 no 2 /www/singlegatesimpleruntimedata.json [13:51:49] INFO: 28 1153 2 no 2 /www/systemruntimedata.json [13:51:49] INFO: 29 1155 9 no 9 /www/systemsetupdef.xml [13:51:49] INFO: 30 1164 17 no 17 /www/foundation-icons.eot [13:51:49] INFO: 31 1181 17 no 17 /www/foundation-icons.ttf [13:51:49] INFO: 32 1198 17 no 17 /www/foundation-icons.woff [13:51:49] INFO: 33 1215 9 no 9 /www/company-logo.png [13:51:49] INFO: 34 1224 9 no 9 /www/company-logo-tight-86.png [13:51:49] INFO: 35 1233 2 no 2 /www/modbusread.json [13:51:49] INFO: 36 1235 2 no 2 /www/devicetime.json [13:51:49] INFO: 37 1237 2 no 2 /www/confirmationcode.json [13:51:49] INFO: 38 1239 255 no 255 /sys/mcuimg1.bin [13:51:49] INFO: 39 1494 5 yes 10 /tmp/phy.cal [13:51:49] INFO: [13:51:49] INFO: Flash usage [13:51:49] INFO: ------------------------- [13:51:49] INFO: used space: 1504 blocks [13:51:49] INFO: free space: 2592 blocks [13:51:49] INFO: memory hole: [1504-4095] [13:51:49] INFO: > Executing Operation: Disconnect [13:51:49] Operation ListFileSystem returned.
Here are the files that I have in the Dropbox OTA folder and their file sizes:
256B f00_sys_servicepack.sig 171K f00_www_app.min.css 372K f00_www_app.min.js 39B f00_www_confirmationCode.json 1.1K f00_www_dashboard.html 267B f00_www_device.json 3.2K f00_www_company-logo.png 3.2K f00_www_company-logo-tight-86.png 54K f00_www_foundation-icons.eot 56K f00_www_foundation-icons.ttf 32K f00_www_foundation-icons.woff 59B f00_www_gateRuntimeData.json 27B f00_www_deviceTime.json 73K f00_www_index.html 27B f00_www_modbusRead.json 671B f00_www_network.json 27B f00_www_singleGateFullRuntimeData.json 65B f00_www_singleGateGateDriverSettings.json 27B f00_www_singleGateSimpleRuntimeData.json 27B f00_www_systemRuntimeData.json 26K f43_sys_servicepack.ucf 122K f80_sys_mcuimgA.bin
When I try to run the OTA the CC3200 downloads servicepack.sig and app.min.css without issue but when it finishes downloading app.min.js the sl_extLib_OtaRun function returns RUN_STAT_ERROR_METADATA (-5) and the OTA process ends.
Looking in the simplelink_extlib/ota/OtaApp.c file this return value is sent when OtaClient_ResourceMetadata returns < 0.
I tried truncating the problem file to different sizes and when it was 190K it did not work but once I truncated it down to 189K the OTA process completed without issue.
I was under the impression that the largest file size on the CC3200 is 1MB, is this smaller for files updated by OTA? Is there something wrong with my configuration that is causing this issue?
Any help in resolving this issue would be much appreciated.
Thank You,
Marek