Best Practice to Implement a Circular Logger on Internal Flash
Posted: Wed Jul 27, 2022 2:07 pm
Hello Everyone,
I want to create a logger on internal flash of ESP32. The data is fixed sized. Some approaches come to my mind listed below:
1- Using NVS library. Disadvantage of this method is needing a key for every data which is unnecessary.
2- Using SPIFFS. This looks heavy to me for this functionality. Also every log data needs a file name and needs additional space on the flash memory. File open/read/write operations may consume more CPU comparing to another method.
3- Writing data by address directly to the flash seems optimum method to me. But I don't know how to do that.
Thanks in advance for any suggestion.
I want to create a logger on internal flash of ESP32. The data is fixed sized. Some approaches come to my mind listed below:
1- Using NVS library. Disadvantage of this method is needing a key for every data which is unnecessary.
2- Using SPIFFS. This looks heavy to me for this functionality. Also every log data needs a file name and needs additional space on the flash memory. File open/read/write operations may consume more CPU comparing to another method.
3- Writing data by address directly to the flash seems optimum method to me. But I don't know how to do that.
Thanks in advance for any suggestion.