關於OTA在UniFlash的設定
在User files裡創建三個檔案,
1.mcuimg1.bin: Max Size最大設定120kb
2.mcuimg2.bin: Max Size最大設定0kb
3.mcuimg3.bin: Max Size最大設定0kb
1是主要OTA會更新的檔案,要預先下載OTA會更新的bin,勢必也要留下相同大小的空間,因此最大設定240k,要能夠同時更新最大的文件大小,就是120k,
這樣的想法是不是對的?
還是其實1、2、3都是要設定120k?
Susan Yang:
您可以看一下 processors.wiki.ti.com/…/CC3100_&_CC3200_UniFlash
File system guidelines
The guidelines are device generic and not related specifically to Image Creation and Programming. These guidelines are applicable also while programming via Uniflash or MCU host.The File System by itself requires 12KB (3 blocks)
Each file as a minimum consume:
1 Block (4KB) for file with no fail safe support
2 Blocks (8KB) for file with fail safe support (twice the original size)
The file system aims to store all or some of the followings: ServicePack file, system files, configuration files, certificate files, web pages files, user files
The most demanding system file in terms of space is the ServicePack file
It is possible to set the maximum size attribute provided upon file creation (the file system reserves space). In this case, the actual size of the file is irrelevant as file system occupies the allocated space
There is no fragmentation in the file system. It means that an existing file which is removed would leave a "hole" in memory. This "hole" may be reallocated by the file system if the new file can fit into it
Each file includes a header which enlarges the actual size of the file. The overhead is 440 bytes. If the file size is very close to a multiple of block (4KB), additional block may be allocated. For example, a file of actual size 4000 bytes would result in allocating 2 blocks as 4000+440 > 4096
CheWei Chang:
回复 Susan Yang:
這個我了解….
但是主要疑問還是沒有釐清…
mcuimg1.bin為工廠預設的Bin,mcuimg2.bin跟mcuimg3.bin都為空的,如果之後進行OTA更新新的程式,勢必會放入到mcuimg2.bin或mcuimg3.bin,因此在max size的設定應該不能都只設定0,因為後來更新的bin檔案大小勢必都會增加,想要了解這幾個的設定…假設
mcuimg1.bin的大小:80k,之後OTA的檔案大小有可能到100k
那在UniFlash裡面的Max Size設定,
mcuimg1.bin的Max Size可以設定為0,因為OTA都不會更新到此,不用管是否會超過原先的檔案大小
mcuimg2.bin跟mcuimg3.bin的Max Size可以設定為110k,因為OTA的bin都往此地方放置,如果Max size都設定0,這樣第二次OTA時,檔案大小超過時,將無法更新…以上這樣的方式對嗎?
Yonghua Pan:
回复 CheWei Chang:
mcuimg2和mcuimg3的max size建议出厂的时候就设置为最大,后面再动态调整很难控制的。