Closed dhylands closed 7 years ago
The SDK comes with 'simplelink,' an example program that provides file-system access.
cc3200-rs now comes with the example programs fileio and fcreate that test several file and file-system operations.
When creating a file, the maximum file size has to be supplied. It's static and can't be changed later on. Unfortunately we cannot control the file buffer's position within the flash memory. Disk fragmentation can therefore reduce the maximum buffer size considerably.
There's a per-file fail-safe mode that provides double buffering for the file buffer. It consumes the double amount of flash memory, but preserves file integrity for power-losses during write operations.
With the fcreate example, the largest buffer I could create was ~880 KB, 440 KB in fail-safe mode, on a 1MB flash memory. According to the FAQ, the maximum file size is 1MB; even on flash memory that is significantly larger than that.
I think we're running into that problem right now. I can flash an 80K image but can't flash a 176K one. I opened a bug with the cc3200tool author, and he's saying that flash file fragmentation may be the issue.
So he's suggesting I erase the entire flash, and reprogram it to see if the larger file will then work.
The PR at https://github.com/fabricedesre/cc3200-rs/pull/60 has support for the file system, files and binary images. The examples also try to work around file-size problems and fragmentation. When the PR landed, this issue can be closed.
Assigned myself, as I already did the work. :)
The PR for file I/O has been merged into cc3200-rs. Closing this issue.
TI assumes that there is a filesystem that stores a variety of files to control the processor.
We've been modifying /sys/mcuimg.bin
TI defines a bunch of other files (like alternate firmware versions - perhaps useful for the updater). So we need to understand the filesystem, what we can store there, and how to access the files if things like certificates are stored there.