diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-25 12:40:53 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-25 12:46:51 -0300 |
| commit | f5f8068fac59b4f16046c2022c2fc7c7e447ef4c (patch) | |
| tree | 2731a3ed4e51cae09e184e25778eded5fc37d1f5 /src/oracle/runtime_ref.c | |
| download | esp32p4-f5f8068fac59b4f16046c2022c2fc7c7e447ef4c.tar.gz esp32p4-f5f8068fac59b4f16046c2022c2fc7c7e447ef4c.zip | |
zig-p4: pure-Zig ESP32-P4 toolchain
build.zig generates the linker script and drives Zig's own LLD; tools/image.zig
turns the ELF into a flashable image and tools/{rom,serial}.zig speak the mask
ROM loader over the UART. No CMake, ninja, idf.py, esptool, or external linker.
src/soc.zig is a comptime register model over ESP-IDF's own *_reg.h headers;
src/hal/ adds peripheral sequences; src/io/ implements std.Io for the chip;
src/oracle/ diffs this HAL against ESP-IDF's on the die.
Diffstat (limited to 'src/oracle/runtime_ref.c')
| -rw-r--r-- | src/oracle/runtime_ref.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/oracle/runtime_ref.c b/src/oracle/runtime_ref.c new file mode 100644 index 0000000..659661b --- /dev/null +++ b/src/oracle/runtime_ref.c @@ -0,0 +1,19 @@ +/* The few libc symbols ESP-IDF's LL code reaches for, supplied so the reference can link into a + * freestanding image. + * + * There is exactly one so far, and it is reached by design rather than by accident: + * `_uart_ll_set_baudrate` (uart_ll.h:532-535) calls `abort()` when handed an LP_UART instance, + * because that path needs `lp_uart_ll_set_baudrate` instead. The differential harness only ever + * passes HP UART instances, so this is unreachable in practice - but the linker does not know that, + * and a missing `abort` fails the build with a symbol name that explains nothing about why. + * + * Spinning rather than resetting is deliberate: if a reference implementation ever does call this, + * the board stops with its last console line intact, which is the difference between a diagnosable + * failure and a reboot loop. + */ + +__attribute__((noreturn)) void abort(void) +{ + for (;;) { + } +} |
