Scaffold PlatformIO project with Docker-based build, test and flash

- pioarduino platform 55.03.312 (Arduino-ESP32 3.3.x / ESP-IDF 5.5),
  board m5stack-stamps3, M5Cardputer 1.1.1
- native env with Unity for host-side tests
- scripts/ci.sh and scripts/flash.sh run PlatformIO in a container
- version injected from git describe
- boot stub shows name, version and pressed keys
- GPL-3.0 license

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-01 18:35:08 +02:00
co-authored by Claude Opus 5.5
parent fe3be01eec
commit fd4afd54da
12 changed files with 870 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
// roro9stack — boot stub: proves toolchain, display and keyboard.
#include <M5Cardputer.h>
#include "version.h"
void setup() {
auto cfg = M5.config();
M5Cardputer.begin(cfg, true); // true = enable keyboard
auto& d = M5Cardputer.Display;
d.setRotation(1);
d.fillScreen(TFT_BLACK);
d.setTextColor(TFT_GREEN);
d.setTextSize(2);
d.drawString(roro::kProductName, 8, 8);
d.setTextSize(1);
d.setTextColor(TFT_WHITE);
d.drawString(roro::versionString(), 8, 32);
d.drawString("Press keys...", 8, 56);
Serial.begin(115200);
Serial.printf("%s %s, free heap %u, psram %u\n", roro::kProductName,
roro::versionString(), ESP.getFreeHeap(), ESP.getPsramSize());
}
void loop() {
M5Cardputer.update();
if (M5Cardputer.Keyboard.isChange() && M5Cardputer.Keyboard.isPressed()) {
auto state = M5Cardputer.Keyboard.keysState();
String s;
for (auto c : state.word) s += c;
auto& d = M5Cardputer.Display;
d.fillRect(0, 80, d.width(), 20, TFT_BLACK);
d.drawString("key: " + s, 8, 80);
}
}