BrickProof
Pull the plug on your firmware update, in an emulator, at every point where it matters, and check that the device still comes back.
BrickProof runs your firmware in an emulator (Renode, or m33mu for the chips Renode does not have), cuts power during an update, powers the device back up, and checks that it recovered: an approved image is installed, it is really running, the update was not lost, and an older image cannot sneak back in. It tells you which cuts brick the device, and how to reproduce each one.
It came out of the power-cut tests of Three-Tier-STM32-Secure-Bootloader, where it found three real bugs. That bootloader's fixed release has since been cut at every one of the 12,109 distinct flash states of its self-update, with no failure. Supported chips: STM32F1, STM32F4 (F411), STM32L4 (L476) and Nordic nRF52840 on Renode, STM32H5 (H563) on m33mu.
Run on bootloaders that are not ours, it found:
- OpenBLT (STM32F1): a cut near the end of a programming session can leave a program that the bootloader starts although it is not completely written. Confirmed on a real Nucleo-F103RB. Details and the adapter: adapters/openblt_f103.
- wolfBoot (STM32F411): with partitions of one sector, as in its own Black Pill example, the last step of an update erases the bootloader itself. Confirmed in wolfBoot's own simulator: wolfSSL/wolfBoot#937. Details and the adapter: adapters/wolfboot_f411.
It also ran on MCUboot, on two boards with three upgrade modes: the STM32F411 Black Pill (one-sector slots, swap with scratch, 57 cuts; overwrite only, 14 cuts, 31 torn states and 12 second cuts during recovery) and the nRF52840 DK (swap with move, 156 cuts). No failure on either. adapters/mcuboot.
And on wolfBoot on an STM32H563 with TrustZone, emulated by m33mu (its stm32h5-tz config,
swap update): 171 cuts, 403 torn states and 323 second cuts during recovery, no failure.
adapters/wolfboot_h563. Every target and what it found:
adapters/README.md.
Quick start
You need Python 3.10+. No toolchain, no board, no firmware of your own: a demo comes with the
package, and brickproof setup downloads the emulator (Renode 1.17, checked
against its published SHA-256) for Windows or Linux.
pip install brickproof-fw
brickproof setup
brickproof demo
The demo is a small A/B bootloader updating its app from v1 to v2. BrickProof checks that the update works when nothing interrupts it, then cuts power at every flash state the update goes through and checks that the device comes back each time. Now run a build with a known bug, which BrickProof should catch:
brickproof demo self_lock --fail-fast
brickproof demo --list shows all of them, on five chips. Getting started
walks through the demo, its bug builds and installing the emulator yourself.
Testing your own firmware
Go to the folder with your built firmware and run:
brickproof init
brickproof run brickproof.yaml --full
init asks a few questions, boots your firmware once to find out the rest, and writes an
adapter with a comment on every line. run --full does everything in one go and ends with
PASS or FAIL and an HTML report. Testing your own firmware
has the details, and what a run covers says what is tested.
In CI
- uses: AdhamEhab14/brickproof@v0.4.0
with:
adapter: test/brickproof.yaml
args: --torn --depth 2 -j 3
The job fails if any cut does not recover, and the reports are uploaded as an artifact. A Docker image is there too: results, a real board, and CI.
Documentation
| docs/ | everything below, in one index |
| Getting started | install, the demo and its bug builds |
| Testing your own firmware | init, check, run, the three kinds of update |
| Five steps for: MCUboot, a staged image, over the UART, a storage library | the guide for your kind of update |
| What a run covers | every kind of test a run makes |
| Results, a real board, and CI | reports, exporting a cut's flash, the Action, Docker |
| The adapter file, options, limits | reference |
| Targets | the real firmware it has run on, and what it found |
| Contributing, how it is built, decisions, features | for working on BrickProof: set-up, how a change is checked, recipes |
Licence
Apache-2.0, see LICENSE.
Metadata
Release files for brickproof-fw 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| brickproof_fw-0.4.0.tar.gz | 453.9 kB | With provenance | Details for brickproof_fw-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brickproof_fw-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for brickproof_fw-0.4.0-py3-none-any.whl |
Total release size: 1.2 MB
Release files / brickproof_fw-0.4.0.tar.gz
| Download URL | brickproof_fw-0.4.0.tar.gz |
|---|---|
| Size | 453.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8414e9cef055d5ab36dbc0887bf7abf98ecb9e8967dc93a2bbf3dd09fcd3c149
|
|
BLAKE2b-256 checksum How to use checksums |
4bfe4dd83d6b9c4c4a5dbdda6a6d7ab13ae077befda7b60bd23b7489b46faeca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logRelease files / brickproof_fw-0.4.0-py3-none-any.whl
| Download URL | brickproof_fw-0.4.0-py3-none-any.whl |
|---|---|
| Size | 726.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fbfb5f042da5a976e950f2974815a02fdce6dd345ade88eac5a34ce0835aa9a0
|
|
BLAKE2b-256 checksum How to use checksums |
2109a56dc7f95df64eb64fb69c40406ee4f6ed978fcfa31a29fcac9e7b820a88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logSecurity for brickproof-fw 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for brickproof_fw-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.