After various memory exercises, then back to GPS to get UBlox working. UBlox is working. TODO: start libraries, downplay SD Card as we can use memory for interim logging
This commit is contained in:
parent
c7646e169e
commit
41c1fe6819
16 changed files with 2016 additions and 71 deletions
32
exercises/17_Flash/README.md
Normal file
32
exercises/17_Flash/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# 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_logs` exists.
|
||||
- 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:
|
||||
|
||||
```bash
|
||||
cd /usr/local/src/microreticulum/microReticulumTbeam/exercises/17_Flash
|
||||
pio run -e amy -t upload
|
||||
pio device monitor -b 115200
|
||||
```
|
||||
|
||||
Commands:
|
||||
- `help` - show command menu
|
||||
- `stat` - show flash / current file status
|
||||
- `list` - list files under `/flash_logs`
|
||||
- `read` - read the current flash file contents
|
||||
- `clear` - clear the current flash file contents
|
||||
- `write <text>` - overwrite the current flash file with text
|
||||
- `append <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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue