twislaandClaude Opus 5.5 d3948ccc3a M1 step 3: Log writing and Storage Clean-up
- lib/storage_model (host-tested): FAT-safe names, daily Log paths,
  dates from Log/Capture file names, CleanupPlan by category and age,
  byte formatting
- StorageService does all card I/O on its task: queued Log lines are
  written in batches each second (dropped while Logs are paused),
  plus file listing and deletion jobs
- Settings > Storage moves into StoragePage: usage, Clean up
  (category, age with size preview, confirmation), Erase SD card
- Clock: local date for Log names
- Serial: log <text>, sd list

Verified on the device: lines land in /irc/dev/#test/2026-10-02.log
with folders created as needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-02 14:56:06 +02:00

roro9stack

A multi-app firmware for the M5Stack Cardputer ADV with the Cap LoRa-1262. It's a Meshtastic-compatible mesh messenger, plus Wi-Fi tools, IRC, GNSS and more. Licensed GPL-3.0.

Requirements

Only Docker is needed. PlatformIO and the ESP32 toolchain run inside a container, and are cached in the roro9stack-pio Docker volume. The first build downloads about 1 GB and takes a few minutes.

Build and test (local CI)

scripts/ci.sh

This runs the host-side unit tests (test/, native environment), then builds the firmware. The output is .pio/build/cardputer-adv/firmware.factory.bin.

Flash

  1. Connect the Cardputer by USB-C.

  2. Run:

    scripts/flash.sh            # auto-detects the port; or: scripts/flash.sh /dev/ttyACM1
    

    This uploads the firmware, then opens the serial monitor. Quit the monitor with Ctrl+C.

If the upload can't connect, put the device in download mode: hold G0 (the button next to the screen) while plugging in USB, or while pressing reset. Then retry.

If you get "permission denied" on the port, your user needs access to the serial device. Run this once, then log out and back in:

sudo usermod -aG dialout "$USER"

Development aids

scripts/serial_log.sh [seconds] [command…] records the serial output, and can send commands to the firmware first. For example, scripts/serial_log.sh 30 short sleep:12 burst sets short screen timeouts, waits 12 s, then sends a burst of Toasts.

Command Effect
burst Publishes 5 Notifications at once
key up|down|left|right|select|back|home Injects a logical key press
sound on / sound off Toggles the Sound setting (beep + LED)
short / normal Screen timeouts 5 s / 10 s, or 30 s / 60 s
wifi add <ssid><TAB><password> Adds a Saved Network (so credentials stay out of the repo)
log <text> Appends a line to a test IRC Log (/irc/dev/#test/<date>.log)
sd list Lists the files of each Storage Clean-up category
wifi status Prints Wi-Fi state, network, signal, clock and free heap

scripts/flash.sh stops a running serial log first, since it would hold the port.

S
Description
Custom firmware for the M5Stack Cardputer ADV + Cap LoRa-1262 (GPL-3.0)
Readme GPL-3.0
2.5 MiB
2026-10-06 22:01:44 +00:00
Languages
C++ 84.9%
HTML 5.9%
Python 4.1%
CSS 3.2%
Shell 1%
Other 0.9%