Firmware field notes

Practical writeups and runnable demos for engineers who build close to the hardware.

Latest writeups

A Practical Bare-Metal Secure Boot Kit for Cortex-M (A/B + Anti‑Rollback + QEMU Demo)

TL;DR: Want a secure‑boot example you can run, break, and verify (not just read)? This kit gives you a clean baseline: A/B slot boot, watchdog rollback, anti‑rollback, key lifecycle, and deterministic pass/fail demos on host + QEMU. Bare-metal secure boot you can actually run (and break) in 10 minutes Secure boot on Cortex‑M is not a service. It’s a single decision point immediately after reset: ✅ verify the candidate firmware image (format + integrity + “auth” binding) ✅ decide run or refuse to run ✅ behave deterministically under failure (no “crash and hope”) Most posts explain the idea. This one stays educational and gives you a runnable baseline you can reuse.

SW/HW Co-Simulation Stack Design

A practical RISC-V SW/HW co-simulation stack that combines Unicorn ISS, a QuestaSim SystemVerilog testbench, and a DPI-C bridge for realistic pre-silicon firmware and RTL co-verification.

FPGA Prototyping in HLS C++ (Part 3)

In this post, I discuss the HLS application development lifecycle using the RGB2YCbCr project as an example, and compare the HDL approach with the SmartHLS C++ approach for FPGA prototyping.

FPGA Prototyping in HLS C++ (Part 2)

In this blog, I delve into the core features and fundamentals of HLS C++, using Microchip SmartHLS as an example, including SW/HW co-simulation, custom C++ libraries, and basic SmartHLS pragmas.

FPGA Prototyping in HLS C++ (Part 1)

In this blog, I introduce Microchip SmartHLS as an example to explain what high-level synthesis is, why it is useful, how HLS works internally, and how to write SmartHLS C/C++ code.