SeedHammer notes

05 / Firmware investigation

Custom firmware.

Building SeedHammer II firmware, understanding its logging paths, and checking what the machine will actually boot.

Investigation notes, updated November 28, 2026. A local release build and verified external-flash readback succeeded. USB metadata and targeted OTP fields confirm secure boot enabled with both debug-disable bits clear. Neither debug access key is enrolled. SWD access and modified firmware execution remain untested. Nothing has been flashed.

New: source investigation

Before buying a probe

Release reproduction, debug-key validity, exact logging defaults, startup motion, BootROM checks, and a grounded probe decision.

Read the firmware deep dive →

Local build: v1.4.3

The latest upstream release tag checked on November 28 was v1.4.3, commit ea4b65be7137f268fc5e97e06d0fda4996233fbb. It was built unchanged in an isolated Linux Nix container on the operator’s Mac, using the repository’s locked dependencies and TinyGo build helper.

nix --extra-experimental-features "nix-command flakes" run .#build-firmware

The build produced seedhammerii-v1.4.3.uf2: 1,626,624 bytes, 3,177 UF2 blocks. Block magic and alignment checks passed. The initial check covered file structure only. A subsequent offline comparison reproduced the official UF2 exactly after restoring its public key and signature; hardware behavior and bootability of modified code remain untested.

Local artifact SHA-256:

379eabab8a5068ae7abc59f926994529476f255e1623557b58ba2520ded2467b

The upstream build script prepares the signing structure and clears the public key and signature. The resulting local build has no valid release signature. It is kept as a local development artifact, not offered here as a firmware download.

Logging: UART versus USB serial

The upstream README describes debug logging over USB serial and suggests tinygo monitor. However, the tagged flash-firmware script explicitly selects -serial=uart. For that build path, expect physical UART logging rather than assuming USB CDC. TinyGo v0.41.1 resolves the build choices: the default release helper inherits USB CDC; the flash helper selects UART0 on GPIO0 TX / GPIO1 RX at default 115200 baud. The debug tag adds UI input handling independently. Actual logging has not been bench-tested here.

nix run .#flash-firmware flash -tags debug

This is the documented CMSIS-DAP debugger command, not a command tested on this machine. It uses SWD for programming and selects UART for the firmware serial transport.

The debug input handler reads standard input and translates terminal characters into UI events, including arrow keys, Enter, function keys, and text. Debug mode is therefore an input channel as well as a logging aid. Audit payload handling and logs using disposable test data unsuitable for funds.

See the serial integration proposal for rendered schematic excerpts and the distinction between J2 UART and J4 SWD. Physical connector orientation, levels and actual board revision still need confirmation before wiring.

Flashing paths

PathDocumented processStill to establish
USB UF2Hold the firmware button while connecting USB; copy the UF2 to the drive that appears.Whether the image satisfies the device’s boot policy. The official guide lists Windows or Android.
SWD / CMSIS-DAPConnect a debugger and use the upstream flash helper.Debug-disable bits are clear; actual SWD access, wiring and execution remain untested.

Follow the official V2 firmware upgrade guide for production updates. A USB drive appearing or a file copying successfully does not demonstrate that a modified image will boot.

Reading external flash before rework

Readback completed and verified on November 28, 2026. The v1.4.2 release notes document automatic entry into USB drive mode when an insufficient power supply is connected. The platform source also takes this path when power negotiation fails. A computer connected through a data-capable USB cable can provide both a USB host and the low-power condition; a wall PSU alone cannot read the device.

If automatic entry does not occur, use the firmware-button sequence in the official V2 upgrade guide. Entering BOOTSEL mode does not itself establish permission to read flash or run modified firmware.

With a compatible picotool installation and the intended machine identified, the read-only inspection commands to try are:

picotool info -a
picotool save -a -v seedhammer-original.bin

According to the official picotool documentation, save -a saves all flash and -v verifies the saved contents. Actual success depends on bootloader interface availability and flash-access permissions. If multiple compatible devices are connected, select the intended device explicitly using picotool’s device-selection options.

This inspection requires no erase, firmware load or OTP write. The full 16 MiB readback completed with picotool verification reporting OK. The official v1.4.2 UF2 payload matched all 813,568 corresponding flash bytes exactly. All 15,963,648 bytes after the image were 0xFF. The dump remains private and excluded from the website.

Secure boot and “unlocking”

The photographed machine reports firmware v1.4.2 and hardware v1.5, without an “UNLOCKED” suffix. In the v1.4.2 UI source, that suffix is added when the secure-boot feature is absent. The platform check reports the feature when secure boot is enabled with exactly one valid key matching SeedHammer’s expected key.

The initial inference from the photo has since been strengthened by live inspection: secure boot is enabled. Targeted OTP fields also show both debug-disable bits clear, as recorded below.

The source implements LockBoot(), which installs the expected key configuration and enables secure boot through OTP. No corresponding unlock operation was found in the inspected firmware. Raspberry Pi documents the secure-boot enable procedure as irreversible; erasing external flash does not clear OTP. See Understanding RP2350’s security features.

Secure boot and debug access are separate controls. Finding J4 or the upstream debugger command does not establish that SWD can execute custom firmware on a provisioned machine. No OTP writes, key changes, or protection bypasses have been attempted.

Live device findings: debug remains enabled

On November 28 the Mac eventually enumerated the machine as RP2350 Boot through a USB hub. The cause of earlier connection failures is unresolved; no single cable, adapter, or button attempt has been established as the fix.

Picotool reported RP2350 revision A4, QFN80, 16 MiB flash, an installed ARM Secure image with a verified signature, secure boot enabled, and debug plus secure debug enabled. Targeted read-only field checks confirmed:

CRIT1.SECURE_BOOT_ENABLE = 1
CRIT1.DEBUG_DISABLE = 0
CRIT1.SECURE_DEBUG_DISABLE = 0

This changes the development plan: investigate SWD before considering MCU replacement. The bits indicate debug is not disabled by those controls; later KEY5_VALID/KEY6_VALID checks also found neither debug key enrolled. Picotool’s debug labels alone only reflect the critical disable bits. An actual SWD connection, secure halt, and custom-code execution have not yet been demonstrated. No flash write, erase, OTP write, broad OTP dump, or RAM capture was performed.

Practical next step: an off-the-shelf probe

If purchasing a cable anyway, the recommended simpler route is the complete Raspberry Pi Debug Probe kit. It provides CMSIS-DAP SWD and UART interfaces and includes three-pin JST-SH debug cables. This follows a standard tooling path rather than requiring a new GPIO adapter implementation. The owner reports purchasing the kit from SparkFun on November 28, 2026. Arrival and SWD testing are pending; the earlier Amazon listing did not allow purchase.

The v1.5.0 reference schematic specifies J4 as WAFER-SH1.0-3PWB. Its connector footprint corresponds to the three-pin, 1.0 mm-pitch JST-SH style. The Raspberry Pi debug-cable specification uses SHR-03V-S-B or compatible housings. Before connecting, verify the actual connector and continuity: J4 pin 1 is SWCLK, pin 2 GND, pin 3 SWDIO. These are schematic pin numbers, not a left-to-right instruction or a wire-colour convention. No power pin is present on J4.

For the Luckfox route, a three-pin JST-SH 1.0 mm cable with loose leads or 2.54 mm female ends would be useful. If buying the complete probe kit, its included cables are the first option to inspect; no separate connector purchase is assumed necessary.

Alternative: Luckfox GPIO as the SWD adapter

On a Linux Luckfox, OpenOCD’s linuxgpiod driver supports bit-banged SWD. This needs two available, voltage-compatible GPIOs, correct pin multiplexing, and an OpenOCD build with RP2350 support. SWDIO must switch between input and output.

The connected Luckfox instead identified through USB serial as an RV1103 Pico Mini running bare-metal MicroPython 1.27.0. ADB listed no device. That firmware cannot directly run Linux OpenOCD; it would need a custom GPIO/SWD implementation and a USB host protocol.

The available generic Pin API is restricted to GPIO52/53, but those connect to the carrier’s LCD data/command line and Key3 button. The USB-only build deliberately rejects that generic API to avoid peripheral conflicts. The owner is willing to give up LCD use; an adapter build should deliberately reclaim suitable LCD-only pins rather than blindly drive a button net. No adapter firmware has been built or loaded and no GPIO SWD transaction has been attempted.

All new investigation work is kept in seedhammer-dev. Existing ShieldSigner sources were inspected read-only; a private staging copy is under ignored artifacts. No sibling source changes or device reflashing were performed.

First SWD session — planned

  1. Confirm J4 connector orientation and the target’s reference voltage. Connect the probe with target power off, then apply appropriate separate target power.
  2. Use RP2350-compatible OpenOCD tooling and a conservative SWD clock. Begin with chip/core identification and a deliberate halt; debug attachment can affect execution.
  3. Check that secure debug access actually works before attempting a RAM-only diagnostic.
  4. Review startup code and keep engraving outputs disabled before any custom execution. Do not invoke OTP provisioning or boot-lock routines.
  5. Establish return to the unchanged official image before considering persistent firmware changes.

The probe has been purchased from SparkFun. Arrival, wiring, SWD attachment, and RAM execution are pending. The completed flash backup is not proof of any of those milestones.

What copying a signature does

The upstream copy-signature helper supports reproducing the same official firmware and restoring its signature. Copying a valid release signature onto changed code does not authorize those changes. A signature is bound to the signed image; it is not a reusable development permission.

Next development steps

  1. Retain the reproduced v1.4.3 baseline. Offline signature restoration now yields a byte-for-byte match to the official release; this does not sign modified code.
  2. Boot and debug-disable fields have been read. Next establish actual SWD access without modifying flash or OTP.
  3. Test the enabled debug path before considering replacement hardware. Secure boot remains enabled for normal boot.
  4. On hardware that permits development, begin with a minimal no-motion diagnostic that avoids full application Init; only then test non-secret serial messages, parsing and on-device review.
  5. Keep motion changes and real backup use separate from initial input experiments. Record actual results before claiming engraving or recovery compatibility.

SeedSigner serial integration proposal →
Hardware investigations →