- Every doc (README, AGENT, docs/*) now ships as English under the default filename and Chinese as *.zh-cn.md; both versions cross-link in their first line, in-document links stay within the same language - AGENT.md §7 records the keep-both-languages-in-sync rule (same commit, no translating later); CHANGELOG kept in both languages - Docs-only change; version 0.5.1 synced in the usual three places
1.9 KiB
1.9 KiB
English | 简体中文
Tracking upstream esp-emulator / esp-emu-browser upgrades
Pinned baseline
Current baseline: esp-emulator v0.51.0 (_tools/esp-emu-browser/www/pkg,
wasm-bindgen --target web).
Upgrade steps
- Download the new wasm package (e.g.
esp-emu-<ver>-wasm.tar.gz) and unpack the newwww/(_toolsalready hasupdate_esp_emu_browser.bat, currently empty — fill it following this procedure). - Run the M0 probe first:
node tests/m0_probe.mjs <firmware path unchanged; run straight against the pkg>. The probe imports the newpkg/esp_emu.jsdirectly; if any of the six conclusions (Q1a/Q1b/Q2a/Q2b/Q3a/Q3b) changed, updatedocs/FEASIBILITY.mdand theperis/mmio/address tables before touching other code. - Diff the official worker.js:
diff <new_www>/worker.js peris/worker.jsAll our changes to that file carryperis:comments; port the new upstream logic block by block:- new/changed message types → sync into the worker and the page's message routing switch
- run-loop changes (run_batch/throttle/restart) → keep the
peris.onBatchEnd()hook after every batch
- Diff the official app.js / index.html: port page features
(terminal/chart/register/memory panels) into our UI modules and
esp-emu-peris.htmlas needed (our files are superset replicas of theirs). - If the
WasmEmulatorAPI changed (new GPIO/PWM/RMT interfaces!), prefer the official API to simplify device implementations — that is exactly what the roadmap has been waiting for. - Manual GUI pass (firmware load, LED/button, config import/export), commit.
Upstream capabilities to watch (see ROADMAP.md)
- Peripheral APIs beyond GPIO (i2c/spi device models, rmt callbacks, touch, adc)
- An event-callback mechanism (today it is polling only)
- UART1 / snapshot saving in the browser package