summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-26 13:28:33 -0300
committerGabriel Schneider <[email protected]>2026-09-16 11:28:40 -0300
commitb42ecaed412be2e30b9e780eb7c9e46e1535f26f (patch)
treeb93290beb84d87df983615c5a7847e339ee7783b /README.md
parent38bb891dd6bd0074894cbfedbf9185e303cc549e (diff)
downloadesp32p4-b42ecaed412be2e30b9e780eb7c9e46e1535f26f.tar.gz
esp32p4-b42ecaed412be2e30b9e780eb7c9e46e1535f26f.zip
Make the toolchain a package another build can drive, and move the editor's glue to the editorHEADmain
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 14 insertions, 4 deletions
diff --git a/README.md b/README.md
index 33fc3f5..669e893 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ zig-out/bin/p4-console --port /dev/ttyUSB1 --baud 115200
| build, warm | ~1 s | 0.07 s | **0.088 s** (cache hit, no work) |
| build, one file edited | ~1 s | 0.07 s | **0.121 s** |
| flash + verify + run | ~2 s (esptool + stub) | ~2 s | **0.277 s** |
-| host dependencies | ESP-IDF 663 MB + toolchain 3.4 GB + Python | Zig + system LLD + esptool | **Zig** |
+| host dependencies | ESP-IDF 663 MB + toolchain 3.4 GB + Python | Zig + system LLD + esptool | **Zig** (the two pardes steps also want the sibling editor checkout — see Requirements) |
| artefacts per build | ~1,100 files | 2 | **1** |
The 66 KB → 1 KB step is the interesting one. `esptool` refuses to put two flash-mapped segments
@@ -62,7 +62,17 @@ ESP32-P4 rev v1.3 silicon.
## Requirements
-* Zig 0.16.0. That is the whole list.
+* Zig 0.16.0, plus a network fetch on the first build. `build.zig.zon` now pins exactly one package,
+ `cloud9` — the base 9P2000 implementation — and only the GPIO 9P application reaches for it
+ (`zig build -Dapp=../02-pardes-code/src/esp32p4_9p.zig`). Zig fetches it into `zig-pkg/`, it has
+ no dependencies of its own, and nothing else here compiles it: `zig build`, everything under
+ `examples/`, the host tests and the harnesses want nothing beyond Zig and this checkout.
+* Two steps are the exception, because they build somebody else's program: `zig build -Dpardes`
+ and `zig build selftest` read source across a sibling-relative path from the pardes editor's
+ checkout at `../02-pardes-code/` (the application root and `input_rescue.zig` for the former, the
+ on-die suite for the latter), and `-Dpardes` also links `-Dpardes-obj`, which that checkout's own
+ `zig build -Dplatform=esp32p4` emits into its `zig-out/`. Still not a package dependency — the
+ seam is files on disk — but without that checkout beside this one those two steps cannot run.
* Membership of whatever group owns the serial port (`uucp` on Arch, `dialout` on Debian).
* An ESP-IDF second-stage bootloader and partition table already in flash at `0x2000` and `0x8000`.
This toolchain builds and flashes *applications*; the bootloader is still Espressif's. See
@@ -89,7 +99,7 @@ Everything is a `b.option`, so `zig build -h` lists them all.
| `-Dseconds=<u32>` | `5` | how long `monitor` listens |
| `-Dconsole-baud=<enum>` | `b115200` | the interactive console's rate: what the bootloader leaves UART0 at. Distinct from `-Dbaud`, which the ROM loader auto-detects |
| `-Dpardes=<bool>` | `false` | build the pardes editor as the application. Needs the object below |
-| `-Dpardes-obj=<path>` | `../02-pardes-code/zig-out/pardes-p4.o` | the editor, compiled freestanding by its own build and linked here |
+| `-Dpardes-obj=<path>` | `../02-pardes-code/zig-out/pardes-esp32p4.o` | the editor, compiled freestanding by its own build and linked here |
### Driving the editor over the wire
@@ -179,7 +189,7 @@ tools/console.zig the interactive bridge: raw stdin <-> UART, and the windo
src/soc.zig comptime register model: GPIO, IOMUX, mask-ROM entry points, cycle counter
src/appdesc.zig esp_app_desc_t, linked as its own object so it cannot be optimised away
src/main.zig demo: prints what it can prove, then blinks
-src/pardes/ the pardes editor as firmware: entry, heap, UART, and the C ABI it links to
+-Dpardes app root ../02-pardes-code/src/esp32p4/ — entry, heap, UART, input rescue, on-die suite
examples/minimal.zig the floor: 432 B, blinks and nothing else
examples/echo.zig UART0 duplex echo: the proof that receive works on the die
examples/memprobe.zig what RAM this board actually has, measured rather than assumed