What problem does it solve?
Developing for the Xteink X4 e-reader requires navigating strict embedded hardware constraints (380KB RAM, no PSRAM, RISC-V alignment rules), adhering to precise C coding standards, and following safe SDK bridge patterns to avoid bricking devices or causing runtime instability, which is challenging for new contributors without a centralized guide.
Core Features & Use Cases
- Embedded C Development Rules: Enforces resource discipline (heap/stack safety, flash placement, fixed-point math) and RISC-V-specific safety protocols (alignment, IRAM usage, ISR shared state) tailored to the ESP32-C3 hardware powering the Xteink X4.
- Lua Plugin System Specifications: Defines the complete lifecycle, API binding patterns, and safety guardrails for building extensible e-reader features (readers, tools, services) that load from the SD card without modifying core firmware.
- HAL and Build Workflow Guidance: Provides clear patterns for hardware abstraction layer usage, PlatformIO build commands, and debugging techniques for heap/stack monitoring to streamline firmware and plugin development.
- Use Case: A developer can use this guide to build a custom RTL-aware Bible reader plugin for the Xteink X4 that handles Hebrew text reordering and stores reading progress on the SD card, without reflashing the core runtime.
Quick Start
Follow this development guide to write a compliant Lua plugin for the CrossLua Reader that adds a custom note-taking feature to your unlocked Xteink X4 e-reader.