| .. | ||
| scripts | ||
| src | ||
| platformio.ini | ||
| read_partition_bin.py | ||
| README.md | ||
| show_partition_table.py | ||
Exercise 17_Flash
This exercise demonstrates using Flash storage as a persistent directory-like file system on an ESP32-S3 board.
Behavior:
- Mounts SPIFFS at boot and reports total / used / free flash space.
- Ensures a flash directory at
/flash_logsexists. - Creates a new log file when the device boots, based on the current timestamp:
YYYYMMDD_HHMM.log. - Writes a timestamped line into the new log file once per second.
- Supports console commands to inspect the current file, read it, clear it, append or rewrite it, and list stored files.
- Files persist across reboots and are stored in flash.
Build and upload:
cd /usr/local/src/microreticulum/microReticulumTbeam/exercises/17_Flash
pio run -e amy -t upload
pio device monitor -b 115200
Commands:
help- show command menustat- show flash / current file statuslist- list files under/flash_logsread- read the current flash file contentsclear- clear the current flash file contentswrite <text>- overwrite the current flash file with textappend <text>- append text to the current flash file
Notes:
- If the current timestamp file name already exists, the exercise will append a numeric suffix to keep the file unique.
- On each reboot a new file is created so persistent flash logs accumulate.