flashgate
flashgate is a hardware-in-the-loop verification gate tool for embedded firmware, whose core purpose is to answer "can the firmware that was just compiled actually run once it is flashed onto the board?". It automatically performs the build, flashes via ST-Link, waits for the board to report its identity (a serial banner or a 64-byte signature at a fixed RAM address), then sends real commands over serial and asserts hardware register readback values; if any step fails, it exits with a non-zero exit code and gives the reason. Every verification, whether it succeeds or fails, leaves behind an evidence record containing per-item check conclusions, raw evidence, and artifact hashes. It can be used as a Claude Code Stop hook to block an agent's "done" claim when the firmware it modified has not passed real-hardware verification; it also provides an MCP server, a remote bench service, and an OpenOCD backend. The repository includes a complete buildable example for the ALIENTEK Apollo STM32H743.