Other Parts Discussed in Thread: UNIFLASH, SYSCONFIG
Dear E2E community,
I have encountered a problem with OTA package that makes it impossible to update one of the file (*.html) and in the result failure of the OTA process. The OTA package was built in ImageCreator using CCS 11.1, SDK 5.30, SysConfig 1.11. It was surprising that the OTA package with identical content and settings but built in Uniflash make the OTA process working again. I started investigating the cause and it appeared that both OTA packages are not coherent. The two main differences are:
- In Uniflash certificate for secured files in mandatory, in ImageCreator it is optional (in case it is already present in SFLASH)
- Uniflash convert CRLF to LF without any information. It is done during OTA creation but not when the file is added.
The clue to my issue was the 2. After creating the package in Uniflash the file appears to be a bit smaller and it allows OTA process to be finished successfully at the device. The root cause of the problem was the "Max file size" field in image settings - the updated file exceeded this limit but after conversion from CRLF to LF it was again OK.
I leave my finding here for other people with similar problem in the future. Also, it would be good to inform users about this differences in one of the documents for this MCU.
I would like not to encounter such a problem when the device reach customers so now the question. In ImageCreator the "Max file size" field for "user files" is set to 0 as default. In Uniflash it was not possible to set 0 so, mistakenly, I assumed the 0 means "no size limit". So could you tell me, what does "0" mean in this field and if it is safe to use it as a default setting for files that are very unlikely to be updated in the future?
I did some tests in this area (still "Max file size" is set to "0") and an exemplary file in the image was 49 444 B, it is still possible to updated it when file grows in the update to 52 744 B, but it fails when it reach 52 870 B. According to documentation, the max file size is automatically rounded up in the device to the multiplicity of flash block size (4096 B) but the nearest multiplicities are 4096 * 12 = 49 152 B and 4096 * 13 = 53 248 B. Could you explain what is the logic underneath?
All the best.