Each partition will have just one file.
When the file on one reaches a certain size, I want to first "clean" the other partition so it has a new, empty file on it.
This way, I always have (after some initial period) one full log partition and a partial newer one.
Here is my question:
Currently, I "clean" the partition I am moving to by formatting it, then opening a new file, thus:
Code: Select all
esp_spiffs_format( conf.partition_label );
g_fp_log = fopen( pch, "w" );
I have the formatting working successfully with about 20 tasks running in my system, but if a simple file truncate has no drawbacks, that is much faster and has less system impact.
Thanks!