diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index dcc99aea..8d68cf22 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -5745,7 +5745,53 @@ pub const Pardes = struct { // output buffer, so booting into one means the first dump lands in the same kind of // pane the boot pane already is. It is editable text with no file behind it, which is // the honest description of a buffer on a board with no filesystem. - const content = try p.gpa.dupe(u8, ""); + // AND IT BOOTS WITH SOMETHING IN IT. An empty buffer is honest and useless: the three + // words that make this board interesting take an address, and a board's address space is + // precisely the thing you cannot guess. So the boot buffer is a tour of it - every + // address below comes from this repository rather than from memory, which is why they are + // worth trusting: the two flash figures and the two RAM ones are the linker script's own + // ORIGINs (`05-zig-p4/build.zig`'s MEMORY block), and the peripheral bases are + // `DR_REG_*` from ESP-IDF's headers as `05-zig-p4/src/hal` uses them. + // + // Each command sits alone on its line because an argument list ends at the last argument: + // a trailing comment would be `ExtraArgument`, so the notes go above the lines they + // describe. Run one by putting the cursor on it, `x` to select the line, Tab to execute - + // the same two keystrokes as any other selection, because an output buffer is a file pane + // and these are ordinary words. + const content = try p.gpa.dupe(u8, + \\pardes on an ESP32-P4. No OS, no filesystem: + \\this buffer is text with nothing behind it. + \\Peek, Poke and Hexdump read the bus itself. + \\Numbers are hex, with or without 0x. + \\ + \\Select a line with x, then Tab to run it. + \\ + \\-- this image in flash: rodata, then code + \\Hexdump 40000020 60 + \\Hexdump 40050000 60 + \\ + \\-- L2MEM: firmware data, then editor heap + \\Hexdump 4ff00000 60 + \\Hexdump 4ff40000 60 + \\ + \\-- the mask ROM, where ets_printf lives + \\Hexdump 4fc00000 40 + \\ + \\-- UART0: the console you are reading on + \\Peek 500ca000 4 + \\ + \\-- systimer. Run twice: a register is not + \\-- memory, and the two reads differ. + \\Peek 500e2000 4 + \\ + \\-- GPIO_OUT, and pad 0's IO_MUX entry + \\Peek 500e0004 + \\Peek 500e1004 + \\ + \\-- Poke needs a value. Harmless: a W1TC + \\-- register clears nothing given no bits. + \\Poke 500e000c 0 + ); errdefer p.gpa.free(content); _ = try output_pane.open(p, 0, "", .{ .cmd = .New }, "", content); p.ncol = 1; @@ -15940,4 +15986,3 @@ test "entering tty walks the shell cursor to the column clicked past the prompt" try std.testing.expectEqual(@as(usize, 0), rights); try std.testing.expectEqual(@as(usize, 7), lefts); } - |
