summaryrefslogtreecommitdiff
path: root/src/esp32p4
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-06 18:11:36 -0300
committerGabriel Schneider <[email protected]>2026-09-07 13:59:12 -0300
commit60367d8fe23f6af98ec28e3cf6c2094dfe332df0 (patch)
tree310fc734173cf771881f4691c71909135fadde97 /src/esp32p4
parentfa82cac885cb4738fe36d1e49b4749b5a3e31a4a (diff)
downloadpardes-60367d8fe23f6af98ec28e3cf6c2094dfe332df0.tar.gz
pardes-60367d8fe23f6af98ec28e3cf6c2094dfe332df0.zip
Refactor panes and filesystem; replace FUSE with 9P
Consolidate pane, layout, memory and host code. Serve 9P by default over Unix sockets, with runtime mounts and optional TCP/QUIC transports. Remove FUSE and obsolete proof-of-concept examples. Fix highlighting and terminal-history performance, expand differential and stress-test infrastructure, sort navigation results while preserving the next occurrence, add syntax-colored Braille minimaps, remove SPC-k, and document 9P interaction as a repository skill.
Diffstat (limited to 'src/esp32p4')
-rw-r--r--src/esp32p4/app.zig5
-rw-r--r--src/esp32p4/input_rescue.zig6
-rw-r--r--src/esp32p4/selftest.zig10
-rw-r--r--src/esp32p4/uart.zig11
4 files changed, 10 insertions, 22 deletions
diff --git a/src/esp32p4/app.zig b/src/esp32p4/app.zig
index a9cf627d..ae5679f3 100644
--- a/src/esp32p4/app.zig
+++ b/src/esp32p4/app.zig
@@ -17,7 +17,7 @@
//! What stayed behind is everything a second application would also want, and none of it is
//! duplicated here: the SoC and HAL, the translate-c register layer, the coalescing heap, `std.Io`
//! for this chip, the app descriptor, the generated linker script, the image builder, the flasher
-//! and the interactive console. Those arrive as the `zig_p4` dependency, and this file imports
+//! and the interactive console. The sibling `05-zig-p4` build supplies them; this file imports
//! exactly four of its modules - `soc`, `hal`, `heap` and `config` - plus two sibling files,
//! `uart.zig` and `input_rescue.zig`, which are the editor's own.
//!
@@ -33,8 +33,7 @@
//! give the firmware two ways to reach the editor. And above all it would make the OBJECT path a
//! second arrangement, tested separately: that path is what `05-zig-p4 -Dpardes -Dpardes-obj=...`
//! builds, it is what every measurement in that repository's `experiments/` was taken through, and
-//! it is a supported way to build this board. With the extern kept, both builds link the same eight
-//! symbols against the same object file, so neither can drift and neither is the better-tested one.
+//! it is the firmware build path. Its externs link against that object file.
//! The reasons the seam is a file at all - a nested `build.zig.zon` dependency broke every build in
//! the toolchain repository - are recorded in `src/esp32p4.zig:8-15` and `05-zig-p4/build.zig:238-260`.
//!
diff --git a/src/esp32p4/input_rescue.zig b/src/esp32p4/input_rescue.zig
index 01dd4820..3f1c0268 100644
--- a/src/esp32p4/input_rescue.zig
+++ b/src/esp32p4/input_rescue.zig
@@ -37,10 +37,8 @@
//! same-named module of `zig build selftest`'s on-die root (`:437-438`). Both spell
//! `../02-pardes-code/src/esp32p4/input_rescue.zig`, so there is nothing to keep in step.
//!
-//! Tested from here, both ways: the host checks at the bottom run as their own `addTest` under
-//! `zig build unit-test` (`02-pardes-code/build.zig:1727-1732` - no `link_libc`, because `std` is
-//! the whole import list), and the same source runs against UART0 on the die under
-//! `zig build esp32p4-test`.
+//! Host checks run under `zig build unit-test` here. In `../05-zig-p4`,
+//! `zig build selftest` flashes and runs the on-die checks against UART0.
const std = @import("std");
diff --git a/src/esp32p4/selftest.zig b/src/esp32p4/selftest.zig
index 0d692d98..97b43059 100644
--- a/src/esp32p4/selftest.zig
+++ b/src/esp32p4/selftest.zig
@@ -35,22 +35,18 @@
//!
//! Four of its modules and no more: `soc` (mask-ROM printf, the cycle counter), `hal` (UART0, the
//! systimer, clock/reset), `config` (this build's `cpu_mhz`) and `heap` (the coalescing allocator).
-//! They arrive as the `zig_p4` dependency, which also supplies what makes this an image at all -
-//! the generated linker script, `ENTRY(_start)` and the app descriptor via `firmware(...).attach`,
-//! then `ImageStep`, `FlashStep` and `SelftestStep`.
+//! The sibling `05-zig-p4` build supplies these modules and the firmware image tooling.
//!
//! `input_rescue` is the fifth import and is NOT that package's: it is the sibling file in this
//! directory, handed over as a named MODULE rather than imported as a path. Deliberately so - the
//! `pub` on `FakePort`'s methods below is what lets that module reach them by duck typing across the
-//! boundary, and both builds, this repository's `esp32p4-test` and the toolchain's `selftest`, wire
-//! the identical root the identical way. One file, one arrangement, nothing to drift.
+//! boundary. The toolchain's `selftest` step wires this root and that module together.
//!
//! Not a `zig test` binary, deliberately. Zig's test runner wants an OS, and `std.testing.allocator`
//! is a debug allocator over the page allocator, which on freestanding is either a compile error or
//! a lie. A hand-rolled harness is thirty lines and answers to nobody.
//!
-//! Run with: zig build esp32p4-test -Dplatform=esp32p4 -Desp32p4-firmware (from here)
-//! or: zig build selftest (from ../05-zig-p4)
+//! From `../05-zig-p4`, `zig build selftest` flashes and runs this suite on hardware.
const std = @import("std");
const soc = @import("soc");
diff --git a/src/esp32p4/uart.zig b/src/esp32p4/uart.zig
index 53ee29df..15599423 100644
--- a/src/esp32p4/uart.zig
+++ b/src/esp32p4/uart.zig
@@ -1,4 +1,4 @@
-//! UART0 as the editor's terminal: bytes out, bytes in, and nothing else.
+//! UART0 transport for the editor and standalone GPIO 9P firmware.
//!
//! This is the whole of the firmware's I/O. There is no framebuffer and no keyboard; the board
//! emits ANSI and consumes ANSI, and the terminal emulator on the far end of the CH340 does the
@@ -37,13 +37,8 @@
//! with nothing readable left to explain it. Everything else here touches FIFO offset 0x000 and the
//! status register, and nothing else.
//!
-//! The DIVIDER is the one exception, and it was carved out for the second image rather than for this
-//! one: `docs/registry.typ` `BOARD-1`. The editor's console is opened by a human at 115200 and the
-//! firmware inherits that divider (which is why the paragraph above used to say "not the divider");
-//! the 9P image (`nine.zig`) has a program on the far end that opens the port at whatever rate the
-//! image was built for, and eight times the baud is eight times less latency on every `Tread`. So
-//! `setBaud` exists, this file still never calls it, and `app.zig` still never calls it — the only
-//! caller is the image whose host side is opened to match.
+//! The editor inherits the bootloader's 115200 divider. `src/esp32p4_9p.zig`
+//! calls `setBaud` for its 921600 protocol connection; the host must match it.
const hal = @import("hal");
const input_rescue = @import("input_rescue.zig");