Daniel
|
e55fe71145
|
feat(extensions): implement partition-based extension system v1
Add complete extension system for CrossPoint Reader with the following components:
Extension Apps (src/apps/hello-world/):
- HelloWorldActivity with e-ink display support
- Manual partition swap return mechanism (NOT rollback - bootloader disabled)
- RTC boot counter watchdog (auto-return after 3 failed boots)
- Uses esp_ota_set_boot_partition() + esp_restart() for safe return
AppLoader Utility (src/extension/):
- scanApps() - reads /.crosspoint/apps/*/app.json manifests
- parseManifest() - JSON parsing with ArduinoJson
- flashApp() - OTA flashing with ESP-IDF APIs
- Safety checks: battery >20%, magic byte 0xE9, partition validation
- Progress callback support for UI updates
AppsActivity UI (src/activities/apps/):
- List apps from SD card with selection highlight
- Progress bar during flashing operation
- Button hints (Back, Launch, Up, Down)
- Error handling for missing/corrupt files
HomeActivity Integration:
- Added 'Apps' menu item after File Transfer
- onGoToApps() callback for navigation
- Proper activity lifecycle management
Documentation:
- TESTING_GUIDE.md - Comprehensive testing procedures
- IMPLEMENTATION_SUMMARY.md - Technical overview
Safety Features:
- Battery check before flashing (>20%)
- Magic byte validation (0xE9)
- Partition size validation
- RTC watchdog prevents soft-brick
- Dynamic partition APIs (no hardcoded indices)
Build:
- Added [env:hello-world] to platformio.ini
- src_filter excludes main CrossPoint sources
- Standalone extension builds to firmware.bin
Closes extension system Phase 1 implementation.
|
2026-01-30 17:05:22 -08:00 |
|