Page 1 of 1

LittleFS sample code in ESP32 .c/.cpp task

Posted: Fri Jul 31, 2020 8:06 am
by bbqporkkenton
I designed a PCB board with ESP32 which is using Micropython firmware.
Now I can send a JSON to the ESP32 with the python code, and I would like to write the code into "main.py" so that it can be run after reconnecting the power. I can find the code in "inisetup.py" which is writing the file in Micropython. However, I want to do it in a Freertos task.
I would like some sample code, e.g. config and write the file in "app_main" or Task. I can only find some code like "mp_vfs_lfs2_file_open" but don't know how to use it. Can anyone help me to find the sample code of Littlefs in esp32 task? Thank you all!