feat(esp32p4): support Pocket Vapor and full PocketJS - #208
Draft
doodlewind wants to merge 3 commits into
Draft
Conversation
doodlewind
force-pushed
the
gleaming-value
branch
from
August 3, 2026 08:06
a61007e to
8a08438
Compare
doodlewind
force-pushed
the
gleaming-value
branch
from
August 3, 2026 08:12
8a08438 to
de5240f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
B/Vbenchmarks so DrawList raster cost cannot be confused with physical framebuffer presentation costesp32p4:bundleandesp32p4:devicecommands for stock apps such as Chrome and Feature Cards, including clean project staging and validated segmented flashingWhy
The board-specific work initially proved the Pocket Vapor path, but that is not the complete PocketJS runtime. The board also needs a product host that loads ordinary target-bound PocketJS bundles through QuickJS and the normal retained UI surface, as the existing console and Symbian hosts do.
The full host is intentionally separate from the Vapor firmware so both execution paths remain explicit and independently testable.
LVGL is not in the runtime presentation path. The upstream Waveshare BSP dependency graph still resolves LVGL, but
BSP_CONFIG_NO_GRAPHIC_LIB=1keeps it unused. PocketJS renders DrawLists directly into RGB565 and uses ESP-IDF DMA2D plus the DPI driver's two native framebuffers for presentation.Performance findings
The connected ESP32-P4 cleanly separates two costs:
V 60)B 30)The
Vresult is deliberately not presented as proof that a full DrawList can be rebuilt at 60 FPS. Direct rendering into the native scanout buffer could remove only the copy portion; it cannot remove the roughly 86 ms full-raster cost.Normal Feature Cards interaction now stays incremental:
Warm Detail opens still take about 109-113 ms. The new receipts place about 60-65 ms in the synchronous QuickJS/Solid guest mount and about 29-30 ms in replaying the changed rounded band. The seven-node mount makes 28 individual HostOps calls. A follow-up should keep ordinary Solid node mirrors as plain data rather than installing the Vue Vapor DOM facade's self-referential accessors, then batch ordered numeric HostOps; full-raster throughput needs retained subtree/layer caching or an exact, parity-tested asynchronous PPA batch, not an LVGL port.
Impact
Compatible PocketJS apps can be built and flashed from the repository root:
The full host renders a 480x272 logical viewport at density 2 into a persistent 960x544 RGB565 buffer centered on the 1024x600 panel. GT911 coordinates are mapped back to PocketJS logical touch contacts. New contacts are bounds-hit against the committed frame before the guest turn, and that fact is carried until lift.
This is currently a single target-bound guest per firmware image. The existing launcher can be rendered as an app, but live multi-app switching still needs a board-side bundle table and launcher host operations.
Validation
Automated
bunx tsc --noEmit: passedgit diff --check: passedAttached hardware
d93c5da7c0d40705, QuickJS enabled, ABI 6, 60 Hz, and PPA enabled78e598fa454884a7andc5bc563cd01ab3c8; repeated open/close cycles leave no residual pixels