PostHeaderIcon Retrieve Locked STM32G473VBT6 Source Code: LQFP100 128 KB Read

The STM32G473VBT6 is the 128 KB member of ST’s G4 performance line, built on a Cortex-M4 with FPU running at 170 MHz in a 14×14 mm LQFP100 body. It carries no HRTIM, but the 100-lead package adds an FSMC bus and a Quad-SPI interface. When that firmware was never committed to a repository, the only copy left is the one soldered to the board. To retrieve locked STM32G473VBT6 source code you first have to lift the compiled image off the die, then rebuild it into something a compiler will accept.

The hundred-lead body

The binary you recover from the internal 128 KB array is therefore rarely the whole story, and a complete job also notes what the external device was meant to hold. The die sits centred under the moulding compound, so decapsulation and probing land cleanly.

Where the protection sits

On the STM32G4 family the read protection is not part of the application image. It lives in the option bytes, in a readout-protection level field that the flash controller samples the instant the part leaves reset. The well known mistake is to regress the level through the bootloader to open the part, because that step triggers a mass erase and destroys the 128 KB you were asked to save. Our notes on lock bit protection describe why the image must never be traded for the unlock.

Why a simple read fails

Connect a debugger and the SWD access port answers at the physical layer, then refuses the moment it touches the flash window at 0x08000000. Drop the part into system bootloader mode over USART and the read-memory command declines in the same place. Two interfaces, one decision, because the security level is evaluated before any application code runs.

Getting the raw image out

When the electrical route is closed, the package is the way in. We etch the moulding compound away to expose the silicon face while the part remains electrically live. From there a precisely timed optical fault at the security check during boot can make the verification fall through, opening the debug port long enough to stream the array out. Where glitching is not the right fit, microprobing the bus directly reads the flash. The 128 KB dual-bank array with ECC is a quick capture once the port holds, and the option bytes are read alongside so the original lock state is preserved.

Route Needs decap Preserves image Notes
SWD read no n/a blocked at level 1
Bootloader read no n/a blocked at level 1
Optical fault after decap yes yes fastest on live die
Microprobing yes yes works at level 2

From image to function boundaries

A raw 128 KB image is not source. The rebuild begins by mapping the Cortex-M4 vector table at the base of flash, then walking the reset and interrupt handlers to find where each function starts and ends. The STM32G473VBT6 leaves no debug symbols in the locked image, so boundaries come from the call graph, literal pools and the Cortex-M push-pop patterns rather than names. Peripheral registers sit at fixed addresses, so register touches in each routine reveal whether a block is driving the ADC, the FDCAN bus or the Quad-SPI device.

Rebuilding to a compilable file

To retrieve locked STM32G473VBT6 source code the rebuild has to respect the dual-bank layout and the peripheral order the hardware expects. We reconstruct the peripheral setup, preserve the interrupt structure, and emit code that builds against the standard G4 device headers. Where the board also relied on an external serial flash, that dependency is flagged so the rebuild targets the real hardware. Getting the tree to compile is what separates a reconstruction from a dump. The vector table is rebuilt first so the reset and interrupt entry points are correct, then each function is separated using the call graph, the literal pools and the Cortex-M4 push and pop patterns, because a locked image carries no symbol table. Peripheral registers sit at fixed addresses, so a routine that drives the FDCAN bus or the Quad-SPI device is identified by its register footprint rather than by any name in the binary. The same verified image is what gets written to a blank part when a firmware clone is the goal, and the STM32G473VCT6 binary copy is the same treatment on a sibling part.

What the client receives

You receive the complete flash binary image of the STM32G473VBT6, the option bytes showing the original lock state, and a disassembly-based source reconstruction you can compile. A verification report records the read passes, the checksums, and the protection level found. Where the aim is a running replacement, the same verified file seeds the flash recovery and clone steps.

Comments are closed.