Skip to main content

flash

Any game (apps/porthole). Use when building, flashing, or bringing up Porthole firmware on the physical Waveshare board. Covers the exact build/upload/serial sequence, the PlatformIO-venv Python-dependency caveat, and how to set the clock.

소스 정보

저장소
dreamiurg/porthole
최근 소스 활동
2026년 9월 27일 22:45
감지된 SKILL.md 언어
영어
스타
1
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
flash
description
Any game (apps/porthole). Use when building, flashing, or bringing up Porthole firmware on the physical Waveshare board. Covers the exact build/upload/serial sequence, the PlatformIO-venv Python-dependency caveat, and how to set the clock.
1. Build: `make -C apps/porthole firmware` (runs `pio run -e firmware` in the app dir; the board config extends the shared `platform/waveshare-round.ini`). 2. If the build fails inside PlatformIO's own build tooling (not your code) with a missing Python module, install it into PlatformIO's own venv, not your shell's Python: ```bash uv pip install --python ~/.local/share/uv/tools/platformio/bin/python pyyaml rich-click intelhex rich esp-idf-size "click<8.2" ``` 3. Find the device: `pio device list` (the on-board CH343 USB-UART bridge; macOS `/dev/cu.usbmodem*`, Linux usually `/dev/ttyACM*`). PlatformIO auto-detects it when only one board is attached. 4. Flash: `make -C apps/porthole flash` (or `make -C apps/porthole flash PORT=<port>`). 5. Monitor: `make -C apps/porthole monitor` (or with `PORT=<port>`). Expect `[porthole] boot`, then within a couple seconds `[porthole] profiles=N now=<epoch> heap=<bytes>`. 6. Set the clock if the boot log says the RTC was not running: send `T<epoch>` over serial, where `<epoch>` is local wall-clock seconds (the board does no timezone math): `printf 'T%s\n' "$(python3 -c 'import time; print(int(time.time()) + time.localtime().tm_gmtoff)')" > <port>`. Plain `date +%s` is UTC on every machine and would put the board hours off. After flashing a board that ran the old standalone Biscuit firmware, always set the clock with `T`, even when the RTC runs: that firmware kept the RTC on UTC, and Porthole reads it as local time. 7. Other serial commands: `S` prints the active profile and game stats plus free heap and current epoch; `R` erases every profile and every game's saves and reboots; `P<n>` clears profile `n`'s 4-digit secret code; `D` toggles touch-position logging; `A` prints the motion sensor (raw chip axes and gravity in screen terms); `G<x>,<y>,<z>` overrides gravity in milli-g for tests (bare `G` clears it); `M` prints frame metrics (update/render/present ms, fps, heap, PSRAM). `tools/devctl.py` wraps these as `tilt X Y Z`, `untilt` and `metrics`. 8. A clean build and a clean boot log are not a working display or touch panel. Only report those as confirmed if you or the user actually saw them work -- say explicitly which you verified and which you didn't.
GitHub에서 보기