🛡️ Secure your IP with 100% Air-Gapped Labs & Signed NDAs
WhatsApp: +86 18928482768 | sales@pcbdesignlab.com

Summary

Firmware extraction in PCB reverse engineering covers SPI flash reads, JTAG and SWD access, protected MCU handling, and analysis of recovered binaries.

Firmware extraction is the workstream that reads executable code back out of a board’s memory devices, the difference between a working rebuild and a paperweight. In firmware extraction PCB reverse engineering projects, the code track decides whether the board boots. A packaging line stops when its controller dies. The OEM vanished years ago. The schematic team can trace the copper, but the code lives in a flash chip, and if that image is lost, no recovered schematic will make the board run.

This guide covers the physical side of the job, reading executable code back out of flash and protected silicon. For what happens after the image is off the board, disassembly, behavior analysis, and debug-interface work, see our firmware reverse engineering guide.

The work shows up in nearly every engagement that touches a microcontroller, a field-programmable gate array (FPGA), or an external flash device, priced as its own line item. Indicative industry pricing puts IC decryption and unlock services at an estimated $200–$2,000+ per protected IC depending on security complexity, a planning range, not a quote. The segment is not shrinking, either: the reverse engineering schematic design market is projected to reach roughly USD 4.94 billion in 2026. Firms that scope firmware on day one finish; firms that discover it at integration do not.

Firmware reverse engineering extraction from a PCB

Why Firmware Decides The Project

A recovered board without firmware is static hardware. The printed circuit board (PCB) connects components; the code tells them what to do. In industrial, medical, and legacy-equipment projects, the firmware image is often the only surviving copy of behavior that was tuned over years, motor ramps, calibration tables, communication timing. Lose it and you own a schematic, not a machine.

Firmware work runs in parallel with schematic recovery, not after it. A protected microcontroller can take days to open, or refuse outright. The two tracks merge only at integration testing, when the recovered image must boot on the rebuilt board. Planned as one sequence, the project doubles in length.

The price structure makes the case for early scoping. IC decryption and unlock services are quoted per device, not per board, and indicative industry pricing puts rush work at a 25–50% premium on top. A board carrying two protected microcontrollers and one secure FPGA is three line items, each with its own odds of success. That’s why a serious quote for PCB reverse engineering applications breaks firmware out separately instead of burying it in “miscellaneous.”

One failure mode deserves a name: the rebuilt board that powers up and misbehaves because a calibration table lived in flash, not in the schematic. Extraction exists to prevent that afternoon.

Where Firmware Lives On A Board

Firmware rarely lives in one place. A typical board carries at least two storage locations: the microcontroller’s internal flash and one or more external devices. Where the code lives dictates how it is read and how well it is protected.

External serial flash is the friendly case. The chip sits in a standard 8-pin package on a serial peripheral interface (SPI) bus, and a clip programmer reads its contents directly, no microcontroller involvement, no protection to defeat. Internal flash is the opposite case: the image hides behind the debug port, Joint Test Action Group (JTAG) or Serial Wire Debug (SWD), and its read-protection fuse. The table maps each option to what extraction means.

Storage Type Access Method Protection
SPI NOR flash In-circuit clip read, or desolder and socket Usually unprotected; one-time programmable regions exist
EEPROM I2C or SPI read Rarely protected; holds calibration and serial data
Parallel NOR and NAND Chip-off read with an adapter Rarely protected; NAND adds error correction handling
MCU internal flash JTAG or SWD debug access Read protection (RDP) levels are common
Secure elements Proprietary host protocols Designed specifically to resist extraction

The decision tree is simple. External flash gets read directly, faster, non-destructive, and it bypasses microcontroller security entirely. Internal flash depends on the debug port and the vendor’s protection scheme.

Secure elements deserve a straight warning: they exist to resist exactly this work, and a lab that promises a guaranteed readout is guessing out loud.

Package standardization helps. The eight-pin SPI flash footprint and its signal order, CS, MISO, WP, GND, MOSI, CLK, HOLD, VCC, follow JEDEC memory standards, which is why one clip programmer covers thousands of parts.

Firmware versus software reverse engineering on an embedded board

Extraction Methods At A Glance

Five methods cover most board-level firmware recovery. Each trades speed against risk, and the right choice depends on where the code lives and how the board is built.

In-circuit reads via JTAG or SWD. JTAG is the IEEE 1149.1 interface: five signal pins, TDI, TDO, TMS, TCK, and optional TRST. SWD needs only two pins plus ground. Both read and write memory while the chip stays soldered, the default path when the debug port is enabled and protection is low.

Offline reads with clips and programmers. The clip path is the workhorse for external flash. An eight-pin small outline integrated circuit (SOIC) test clip grips the chip in place while a programmer reads the image at 3.3 V or 1.8 V. No debug port, no microcontroller involvement. Desolder and socket only when the clip can’t seat.

UART console and bootloader extraction. Some boards leave a universal asynchronous receiver-transmitter (UART) console open even when the debug port is locked. A USB-to-UART adapter, FTDI or CP2102, wired to the transmit, receive, and ground pads, plus terminal software such as PuTTY or minicom, reaches a bootloader shell that can dump memory or accept a read command. It costs nothing to try, and it’s the cleanest recovery on boards whose console was never disabled.

Chip-off reads. Chip-off means removing the flash and reading it in a socket, slower and riskier than clipping, but the only practical route for potted boards, coated assemblies, and parallel NOR or NAND devices.

Decapping for protected dies. Decapping removes the package to reach silicon-level protections. Chemical decapping uses concentrated acids under an inert atmosphere; laser decapping vaporizes the molding compound down to the bond wires. It’s the last resort, quoted as an attempt, not an outcome.

Method Where It Works Destructive? Main Risk
In-circuit JTAG or SWD Enabled debug port, low protection No Production firmware often disables the debug port
Clip or programmer read External SPI flash in 8-pin packages No Clip contact; bus contention from a live board
UART console or bootloader Open console pads, reachable bootloader shell No Console disabled in production builds
Chip-off socket read Potted boards, parallel flash Yes Heat damage and lifted pads
Decapping and fault injection Protected microcontroller dies Yes Success is probabilistic, never guaranteed

The ordering is the opinion. Try in-circuit debug first, the clip second for external flash, the UART console third wherever pads are exposed, chip-off fourth, and decapping only when every non-destructive path has failed and the owner has accepted the risk in writing.

Step By Step SPI Flash Extraction

The external flash read is the most reliable extraction in the field, repeatable enough to write as a procedure. Run the steps in order. None are skippable; the last two hide most bench errors.

  1. Identify the part. Read the marking under magnification and pull the datasheet — the exact part number sets the voltage, command set, and memory map. A guessed part number turns a routine read into a damaged chip.
  2. Verify the VCC range. Most SPI flash runs at 3.3 V or 1.8 V logic levels; powering a 1.8 V part at 3.3 V destroys it.
  3. Connect the clip or desolder. An eight-pin test clip works when the footprint has clearance. Otherwise desolder the part, socket it, and read offline.
  4. Read with the programmer. Read the full address space, never a partial region. Save the raw binary plus an Intel HEX copy as the sanity cross-check.
  5. Verify with a second read. Read the same device again immediately and compare. Two reads that disagree mean poor clip contact, a noisy rail, or a failing chip.
  6. Compare checksums. Generate a checksum per read; two matching checksums are the acceptance gate, anything less returns to step three. Then scan the image for structure — section headers, version strings, a boot vector at the expected offset.

One bench habit saves the most time: if the board ties the flash to a powered microcontroller, the controller can drive the bus mid-read and corrupt the image. Hold the controller in reset while reading. It’s a two-wire fix.

Where an original update file survives, use it. A byte-identical match with the vendor’s published firmware is the strongest verification available.

LPC IC firmware testing with a clip programmer on a circuit board

Handling Read Protected Microcontrollers

Read protection (RDP) is a fuse inside the microcontroller that blocks the debug port from reading internal flash. On STM32 parts from STMicroelectronics, RDP level 1 disables flash reads over SWD while leaving the part runnable. On NXP LPC parts, code read protection (CRP) plays the same role.

What protection blocks, in plain terms: the debugger cannot read memory or set breakpoints in protected regions, and mass erase becomes the only sanctioned escape, destroying precisely the code you came to recover.

The bypass techniques are real but probabilistic. Voltage glitching disturbs the supply rail so the CPU skips the security check; electromagnetic fault injection (EMFI) and laser fault injection exist for higher-security targets. None carry a warranty. Modern parts, ARM Cortex-M devices with TrustZone in particular, make non-destructive extraction extremely difficult or impossible, so a professional lab quotes the work as an attempt with a stated probability, not a guaranteed readout.

When the debug path is closed, decapping enters the conversation: removing the package and working at the die level. That discipline carries its own cost, success rates, and authorization requirements. Expect the honest answer to be “maybe.” Any provider who answers “always,” or starts destructive work without written authorization, is disqualified.

Field-programmable devices raise the same question in a different register. Field-programmable gate array (FPGA) and complex programmable logic device (CPLD) bitstreams usually live in an attached configuration flash, so the clip and socket paths apply directly. When the bitstream is fused inside the device, JTAG boundary scan becomes the default vector for reading pin states and configuration. IC unlock work spans digital signal processors (DSPs), CPLDs, programmable logic devices (PLDs), AVR and ARM microcontrollers, Actel parts, and ALTERA/Intel FPGAs, and each family carries its own protection scheme and its own odds of success.

Microcontroller read protection during firmware extraction

Need Firmware Extracted Alongside the Schematic?

SPI flash reads, protected MCU attempts, and verified binary delivery from our Shenzhen engineering team. Signed NDAs and non-destructive options come standard.

Get a Free Quote →

ISO-Certified · 10+ Years Experience · Non-Destructive Options Available

Firmware Analysis What To Look For

A recovered image is evidence before it is software. The binary gets read like a document, and what it contains decides whether the rebuild is a drop-in replacement or the start of a redesign.

Version strings and build dates. The strings identify which release you hold and whether it matches the hardware revision in your hands. A 2011 image on a 2015 board is a mismatch that explains behavior no schematic will.

Hardware configuration tables. Configuration blocks hold board-specific values: memory timings, display settings, MAC addresses, calibration gains. These tables are the irreplaceable part of the image. The surrounding code can be re-sourced; the tuned values cannot.

Communication protocol parameters. Baud rates, register maps, polling intervals, message framing. For a line controller these numbers are the integration contract with the rest of the machine, far cheaper to read from a recovered image than to re-derive by probing a live bus.

Bootloader behavior. The boot structure shows how the device updates itself and what it accepts from a host. That matters when the goal is a serviceable board, one that accepts future updates, not just one that boots once.

Static tools make the read-out tractable. Binwalk pulls embedded sections out of a binary; Ghidra, the free suite from the NSA, handles decompilation across architectures; IDA Pro adds deeper commercial support. A first static-analysis pass usually answers the deciding questions: which release is this, and what does its hardware table contain.

One habit pays for itself: never flash the only copy. Store the original binary plus a verified duplicate, and write the working copy to the spare board first.

When To Rebuild Firmware From Scratch

Extraction is not always the right answer. Some projects finish faster by writing new firmware that matches the recovered behavior. The decision is a three-way test; the table settles the common cases.

Situation Verdict Reasoning
Image corrupted, checksums never match Rebuild Flashing a corrupted image repeats the original failure
MCU unreachable, no external copy exists Rebuild There is nothing to extract; behavior is the spec
Simple state logic, short I/O list Rebuild Reimplementation lands inside a normal recovery window
Closed-loop control with tuned gains Extract Re-deriving tuning means re-commissioning the machine

The cost logic favors extraction whenever the firmware contains tuned parameters, proportional-integral-derivative (PID) gains, motor ramps, calibration tables. Re-deriving them means re-running commissioning on the machine itself, usually the machine that is down. Weeks of floor time dwarf any extraction quote.

Simple logic tips the other way. A sequencer whose behavior fits on one page of state logic is cheaper to rewrite than to extract, protect, and verify. Honest labs say so; a lab that always quotes extraction is billing for drama.

The turnaround math supports the split. A simple two-layer board moves through schematic recovery in one to two weeks; a reimplementation scoped to the same behavior fits that window, while a protected-die extraction attempt may not fit any window.

Tools For Physical Extraction

The bench splits into four tool groups, and capability matters more than brand loyalty. A working setup carries all four, because no single tool covers both extraction and analysis.

Programmers. Universal programmers read SPI flash in socket or through a clip. CH341A-class boards, FT2232H units, and Dediprog models all appear on working benches. What matters: 1.8 V and 3.3 V support, full-address reads, and a verify pass built in.

Debug probes. Probes speak JTAG and SWD to the target. J-Link from Segger and ST-Link cover the mainstream; OpenOCD drives CMSIS-DAP and DAPLink hardware as the open-source option. The probe that matters supports your target’s protection level.

Logic analyzers. A logic analyzer earns its place on protected targets. With the debug port locked, watching the SPI bus between microcontroller and flash shows what the boot process reads and when. On an owned board, that capture is legitimate.

Disassemblers and analysis software. Binwalk, Ghidra, Radare2, and IDA Pro turn binaries back into structure and code; QEMU runs an image in emulation when the target hardware does not exist yet. For a first pass, Ghidra wins on price since it’s free, while IDA Pro still leads on obscure architectures. Start free; pay only when the tool stalls.

A fuller breakdown of the bench is in our PCB reverse engineering tools guide. The short version: a capable lab shows you its verification workflow, not just its hardware list.

Binary and HEX firmware file analysis

The technical rules are simple compared to the legal ones. Extract firmware only from boards you own or are expressly authorized to service. Get that authorization in writing, and state the purpose, repair, interoperability, or analysis, before any work begins. A documented purpose separates a legitimate engagement from a liability.

In the United States, three frameworks matter. The Semiconductor Chip Protection Act permits copying mask works for teaching, analysis, or evaluation. The Digital Millennium Copyright Act (DMCA) Section 1201 bars circumventing technological protection measures, with a narrow interoperability exemption in Section 1201(f); the Library of Congress revises related exemptions every three years. The practical line: owning a board does not by itself grant the right to break its read protection, and redistributing protected code is where projects go wrong.

The circumvention question deserves honesty. Repair-focused exemptions exist and have expanded, but they are fact-specific and periodically revised. When a target is read-protected, the decision to attempt fault injection is a legal decision as much as a technical one. Providers like our PCB reverse engineering lab require written authorization and a stated purpose for exactly this reason; the site’s legal guidance covers the boundary in more detail.

One rule covers every jurisdiction. If the board belongs to someone else and you lack written authorization, the extraction does not happen. That rule is the difference between a recovery project and a lawsuit.

Frequently Asked Questions

What is firmware extraction in PCB reverse engineering?

It is the workstream that reads executable code out of a board’s memory devices, such as SPI flash, EEPROM, and MCU internal flash. A recovered schematic alone cannot make a rebuilt board run, because the instructions that control it live in those chips rather than in the copper traces. Firmware extraction recovers that code so the new board powers up and behaves exactly like the original.

How much does firmware extraction cost?

Indicative industry pricing puts IC decryption and unlock services at an estimated $200-$2,000+ per protected IC depending on security complexity, while unprotected external flash reads cost less. The spread is wide because a simple part may crack in hours while a hardened secure MCU takes days of focused effort. Request a per-IC line item so you can see exactly what you are paying for.

Can read-protected microcontrollers be extracted?

Sometimes. Fault injection methods such as voltage glitching and electromagnetic fault injection (EMFI) are attempts with a success probability, not a guarantee, and the odds vary part by part. Modern TrustZone parts are often unreachable without destructive methods that risk the chip itself. Before you commit to a schedule or budget, ask the lab to evaluate the specific part number.

Is firmware extraction legal?

Only on boards you own or are authorized to service, with the purpose documented in writing before any work begins. DMCA Section 1201 restricts circumventing protection measures, so get authorization first and keep a record of why the extraction is being performed. When the purpose is repair, interoperability, or security research on your own hardware, the work is generally defensible under the law.

What happens if the firmware image is corrupted?

Two paths remain. The first is to repair the image from partial data, recovering as much code as possible from the undamaged regions of the chip. The second is to rebuild the firmware from scratch using the recovered schematic and observed behavior as the specification. The lab will recommend the cheaper option once it sees how much of the image survived.

References

  1. STMicroelectronics — Arm Cortex-M microcontrollers and memory documentation. https://www.st.com/
  2. NXP Semiconductors — MCU families and code read protection documentation. https://www.nxp.com/
  3. JEDEC — Solid State Technology Association flash memory standards. https://www.jedec.org/
  4. Texas Instruments — Embedded processors and debug interface documentation. https://www.ti.com/
  5. IEEE — Institute of Electrical and Electronics Engineers, publisher of IEEE 1149.1. https://www.ieee.org/
  6. IPC — Association Connecting Electronics Industries standards. https://www.ipc.org/

Conclusion

Firmware extraction in PCB reverse engineering is the difference between a schematic and a working machine. The code that boots a controller, holds its calibration, and runs its protocols lives outside the copper, and it is the asset most often discovered missing after the schematic ships.

  • Scope firmware on day one, in parallel with schematic recovery, with a per-IC line item for protected devices.
  • Read external flash first. Clip reads are fast, cheap, and non-destructive.
  • Treat protected-MCU work as an attempt with a probability, and require written authorization before any destructive step.
  • Verify every image twice, checksum both reads, and never flash the only surviving copy.

When firmware is scoped late, projects stall at integration. The board is ready and the code is not. If your board carries a microcontroller or external flash, raise the firmware question in the first quote, not the last one.

Get Your Free PCB Reverse Engineering Quote →

Get Weekly PCB Engineering Insights!

Practical insights on PCB design, PCB reverse engineering, IC unlocking and hardware development from PCBDesign Lab.

One email each week. Unsubscribe anytime. Read our privacy policy for more info.

Get Started

PCBDesign Lab Has Helped 100+ Customers Build Their Products

Free Consulting