Tactility/.claude/rules/key-conventions.md
Ken Van Hoeylandt 0ebd471cc0
Reduce internal RAM use: embedded assets, fonts in flash, PSRAM stacks, file_ops (#701)
- The `/system` FAT volume is removed. Its files are embedded in the firmware as generated C arrays.
- Default-size fonts are generated at build time and used from flash.
- The LVGL task and the Launcher run on PSRAM-preferred stacks. A new kernel `file_ops` API takes the file work off those threads.
- `MainDispatcher` is reimplemented as an on-demand task.
- More long-lived state is allocated with the PSRAM-preferring helpers.
- Other fixes and improvements
2026-10-18 17:30:43 +02:00

900 B

Key Conventions

  • Shared cross-platform code uses #ifdef ESP_PLATFORM for ESP32-specific paths. Code in Platforms/platform-esp32/ is already ESP-only and does not need guards around ESP-IDF includes.
  • The Drivers/ directory contains hardware drivers (display controllers, touch controllers, PMICs, etc.) — each is its own CMake component.
  • Modules/ contains cross-cutting modules. e.g.lvgl-module (LVGL task management).
  • Data/data/ is flashed as a FAT filesystem image on ESP32 devices that don't have an SD card.
  • Data/system/ is embedded in the Tactility project as generated C byte arrays (generated_assets.h, see Buildscripts/generate-assets.py).
  • The binfont files of the default font size are generated at build time into generated_fonts.h (see Buildscripts/generate-fonts.py).
  • Translations are in Translations/ as CSV files, generated via generate.py.