Custom firmware / Source investigation
Before buying a probe.
What the firmware, BootROM, build artifacts, and live device controls actually tell us about running our own code on SeedHammer II.
Reviewed November 28, 2026. Secure boot is enabled. Both critical debug-disable bits are clear, and neither debug access key is enrolled. Ordinary SWD is worth testing before chip replacement. No SWD attachment, RAM execution, firmware load, or OTP write has been performed.
What is confirmed on this machine
| Check | Result | What it establishes |
|---|---|---|
| USB device information | RP2350 A4, QFN80, 16 MiB flash | Actual chip generation, package and external-flash capacity. |
| SECURE_BOOT_ENABLE | 1 | Normal boot requires an image meeting the configured signature policy. |
| DEBUG_DISABLE / SECURE_DEBUG_DISABLE | Both 0 | Those permanent disable controls are not set. |
| KEY5_VALID / KEY6_VALID | All validity and redundant-copy bits 0 | Neither documented debug access key is enrolled. Only validity flags were read; no key material was requested. |
| USB MSD / PICOBOOT disable controls | Both 0 | These OTP controls do not disable the bootloader’s USB interfaces. |
| SRAM-window boot / watchdog-scratch disable controls | Both 0 | These entry paths are not disabled by those bits. Signature enforcement still matters. |
| External-flash readback | 16 MiB saved and verified | Readback works on this device; this does not demonstrate write permissions. |
The installed image matches the official v1.4.2 UF2 payload exactly: 813,568 compared bytes, no differences. All 15,963,648 bytes following that image are erased (0xFF). The dump, chip identifier and raw device reports stay private.
Correction to the earlier interpretation: picotool 2.3.1 prints its debug-enable labels by inverting the two critical disable bits. It does not test SWD connectivity or account for every other possible restriction. The additional key-validity checks above remove another documented OTP restriction, but a real Access Port connection remains the next gate. Picotool implementation.
The local release build reproduces the official image
We built unmodified tag v1.4.3, commit ea4b65b with the upstream Nix workflow. Its first output has the public key and signature cleared by the build helper.
- Compare UF2 payloads: only 127 bytes differ, all inside the 128-byte public-key/signature area at
0x100c683c–0x100c68bb. - Calculate signing hashes with upstream
picosign: local and official hashes match. - Restore the official public key and signature in a separate local copy: the entire UF2 becomes byte-for-byte identical to the official release, and picotool verifies it.
- Change one instruction-region byte in a disposable offline copy: picotool reports an incorrect signature. That modified file was never sent to the device.
Verified offline
Official release and signature-restored local build share SHA-256:
07bdb759041a08307cf151f94fb77d2c21444418ccc0bf04b432015cbbcb3794This is a successful reproduction of this release, not a method for signing changed code. The release’s public signature can be reused only for the identical signed image. The manufacturer’s private signing key is not in the dump or required for this comparison. Build/signature helpers.
The upstream host test suite also passed using CGO_ENABLED=0 and Go 1.26. The initial Go 1.25 run could not compile tests using testing.TB.ArtifactDir; upstream CI selects Go 1.26. No source patch was needed. These checks establish software/build behavior, not engraving quality or recovery.
Three different operations—not one “unlock”
- Read external flashAlready verified. Copies stored bytes to the host.
- Boot an imageBootROM checks the configured image/signature policy.
- Control through SWDA permitted debugger can inspect and control the cores independently of normal boot.
The RP2350 datasheet documents debug access as allowing system memory access and control of processor execution. Debug-disable flags and optional OTP debug keys restrict it. Our observed controls make normal SWD the logical next experiment; there is no evidence yet that replacing the RP2350 is necessary. RP2350 datasheet, §3.5.9.
A debugger-directed run would not clear secure boot. A modified image written to flash still needs to satisfy normal boot policy after reset or power loss. Conversely, a signed ARM Secure image or an “extra security: not enabled” image-metadata label does not tell us that OTP secure boot is disabled.
USB RAM loading is not an assumed shortcut. In the A4 BootROM source, the old PICOBOOT EXEC command returns unsupported. Image-launch paths use the boot scanner and verification machinery. The SRAM-entry disable bit being clear does not grant blanket permission to run unsigned code through USB. We have not attempted that execution. USB task dispatch and image-verification policy.
Logging transport is a build choice
| Build path | Transport selected by the inspected sources | Important distinction |
|---|---|---|
| Default build-firmware | USB CDC, inherited from TinyGo’s RP2350 target | The helper does not override serial. |
| flash-firmware helper | Physical UART, explicitly -serial=uart | UART0: GPIO0 TX, GPIO1 RX; default 115200 baud. |
| debug build tag | Uses whichever transport was selected | Adds a terminal-to-UI input handler. It does not itself choose UART or disable motion. |
| Stepper driver UART | Separate GPIO9 single-wire PIO UART, 57600 baud | Driver configuration bus; not J2 and not an external seed-import channel. |
This resolves the apparent README/script disagreement: the sources describe different build choices. USB serial on a running application and PICOBOOT in ROM are also distinct protocols, even if USB identifiers look similar. Actual UART logging has not been bench-tested here. TinyGo target, UART pin selection, and terminal handler.
Debug terminal input can become text, arrow-key, Enter, or function-key UI events. Do not treat the channel as output-only or assume it already implements structured wallet import.
Why a debug build may immediately move—or reboot
The application’s main calls Init(). That configures the USB PD controller and initially drives DRV_ENABLE low. It then negotiates an engraving supply in the 20–28 V range. Failed negotiation reboots into BOOTSEL; successful negotiation configures the engraver and launches a homing goroutine.
The debug tag leaves that startup path intact. On ordinary host USB power, a full application debug build may simply return to BOOTSEL. With adequate engraving power, it may home before the developer reaches the UI. A first diagnostic should avoid full application initialization, PD changes, and motion—not just change the version string. Startup and BOOTSEL transition.
What drives the mechanism
Motion is generated by coordinated PIO and DMA, not a stream of UART move commands. One PIO program outputs the two DIR signals, NEEDLE, and two STEP signals. A second, higher-priority state machine gates the solenoid’s on-time; firmware specifies a 25 ms strike cycle with approximately 4–5 ms activation depending on supply voltage. Driver UART configures the axes separately. DIAG lines feed stall/fault handling. PIO program.
The tagged v1.5.0 schematic has TMC2226 drivers; current hardware main differs. The firmware driver package is named tmc2209. A package name is not proof that the physical board contains that exact part. A controller port must preserve pulse timing, driver settings, acceleration/homing, and fault response.
Where a serial import should fit
Platform.NFCReader() currently supplies the input reader. The GUI scanner buffers up to 8 KiB and recognizes seed phrases, output descriptors, codex32 data, and internal command objects. The GUI’s command dispatch can reach OTP boot-lock provisioning. These paths exist outside the debug-tag terminal handler. Scanner and dispatch.
The proposed receiver should parse explicitly typed descriptor/seed messages and return only validated wallet data. It should reject internal command records, enforce bounded lengths and timeouts, handle cancellation, and require on-device review followed by a separate engraving confirmation. Blindly wiring serial input into the general scanner would expose more behavior than the feature needs.
Start with public descriptors and disposable test data unsuitable for funds. Avoid payload logging. No serial import implementation, seed transfer or recovery test has been completed.
What to buy—and what buying will not prove
If buying a connector anyway, the official Raspberry Pi Debug Probe kit, SC0889 is the simpler route. It supplies CMSIS-DAP SWD and UART, nominal 3.3 V I/O, a USB cable and three debug cables. The included SH-to-SH cable is a candidate for J4 after physical connector/orientation verification. Official product.
Purchased from SparkFun, as reported by the owner on November 28, 2026. Arrival and SWD testing are pending. The previously linked Amazon listing did not allow the owner to purchase; SparkFun is the chosen source.
Reference J4 pin order is 1 SWCLK, 2 GND, 3 SWDIO, with no power pin. The connector is three-pin 1.0 mm-pitch SH style, with SHR-03V-S-B or a compatible mating housing. Do not infer cable order from colour or a photograph. For a hand-wired Luckfox adapter, choose an SH-to-loose-lead/header cable instead. Cable specification.
The Linux Luckfox approach can use OpenOCD’s GPIO backend. Our connected Mini runs bare-metal MicroPython instead; it needs an adapter implementation. Its generic GPIO52/53 interface overlaps LCD DC and Key3, and the USB-only build rejects it. Giving up the LCD permits a deliberate pin-reclamation design, not an automatic path to running OpenOCD. Nothing on that board has been reflashed for SWD.
Prepared first-attachment tooling
A native Mac build of Raspberry Pi OpenOCD was compiled from pinned commit 3c89be3 with CMSIS-DAP v2/libusb support. The initial configuration was parsed successfully without initializing an adapter. It selects both Cortex-M33 cores, uses 100 kHz SWD, fixes the known flash size at 16 MiB, and disables server ports. This is a tool/configuration check only.
# Future first attachment: NOT RUN on hardware
openocd -f tools/swd/seedhammer-attach.cfg \
-c 'init; targets; halt; reg pc; shutdown'This deliberately halts and inspects PC. It performs no program/erase/load command, but debug-register writes and halting are state changes. Shutting down the debugger does not promise to resume or reset the target. Wiring, power, actual Access Port permissions, and the behavior of both cores need checking before any custom execution.
Suggested gates: attach and identify → deliberately halt both Arm cores → inspect a narrowly scoped register → prepare a minimal no-motion RAM diagnostic → verify return to the unchanged official image. A RAM diagnostic and all hardware gates remain pending.
Pinned source trail
- SeedHammer v1.4.3 / ea4b65b: startup, power, GPIO/PIO, parser, logging, build and OTP routines. v1.4.2 platform, engraver, OTP and build-helper files were also compared.
- TinyGo v0.41.1 / a4f9c9d: inherited USB serial defaults, UART0 pin mapping and initialization.
- Picotool 2.3.1 / 2041936: interpretation of debug flags and image metadata.
- RP2350 BootROM A4 / c6cdb17: USB task dispatch, image scanning and verification. The A4 source tag was inspected; a full ROM binary comparison was not performed.
- Raspberry Pi OpenOCD / 3c89be3: RP2350 Arm targets and CMSIS-DAP transport.
- RP2350 datasheet: debug controls, debug keys and secure boot.
Observed device facts, source-derived expectations, offline tests, and future experiments are kept separate throughout this record. Software checks are not engraving or recovery tests.