Files
frame/_doc/decisions/0002-elf-loader.md
T
lainandSisyphus dbb7c13729 docs: add v4.2 requirements, plan, and hardware ADRs
Add the v4.2 working documentation set under _doc/:

- requirements-v4.2.md and project-v4.2-draft.md (architecture draft)
- development-plan.md, project.md, README.md (index/navigation)
- decisions/: hardware architecture decision records backing the
  milestone gates (ST7305 display, PCF85063 RTC, SHTC3 sensor,
  TF-card JSONL evidence, KEY input, power/boot policy)

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <[email protected]>
2026-08-31 08:00:31 +08:00

33 lines
1.6 KiB
Markdown

# ADR-0002: Dynamic ELF Loader Selection
Status: Blocked
## Context
The architecture requires signed `.mpb` packages containing Xtensa ESP32-S3 ELF payloads whose verified bytes are loaded into PSRAM/IRAM. No loader or commit is selected. PoC-A must compare candidates before implementation details become product dependencies.
## Candidate Evaluation
Candidate | Repository | Commit | License | ESP-IDF v6.0.2 | Xtensa relocations | Dynamic PSRAM text | `.plugin_iram` | Cache synchronization | Result
--- | --- | --- | --- | --- | --- | --- | --- | --- | ---
TBD | TBD | TBD | TBD | TBD | TBD | TBD | TBD | TBD | Pending
## Required Evidence
- Exact repository URL, commit, license, and local patches
- Accepted and rejected ELF class, machine, section, relocation, and import types
- Program-header and relocation arithmetic with overflow checks
- Function-pointer calls from dynamically allocated PSRAM
- `.plugin_iram` copy, relocation, invocation, and release
- Instruction/data cache synchronization APIs for the locked ESP-IDF tag
- `.init_array`, static constructor/destructor, TLS, exception, RTTI, and unwind behavior
- One thousand load/unload cycles with raw heap and largest-block samples
## Decision Rule
The selected candidate must satisfy every required PoC-A item without loading bytes other than the immutable, verified staging buffer. If no candidate passes, Gate A fails and the architecture returns to review; this ADR does not authorize an automatic fallback or a new loader implementation.
## Gate Impact
PoC-A cannot pass and product PluginLoader work cannot begin while this ADR remains Blocked.