Extract Secured GD32F305RGT6 Flash Content

An extraction of secured GD32F305RGT6 flash content is, on paper, a one-megabyte job; in practice it is a 256 KB job followed by a 768 KB job, because that is how the array is built. The RG is the top-capacity 64-pin member of the GD32F305 connectivity line: 256 KB of executable code area plus 768 KB of data area, 96 KB of SRAM, and a Cortex-M4 running at 120 MHz with zero-wait-state access on the code side. Firmware for this part typically keeps its program tight and pushes everything bulky — logs, parameter sets, licence records — into the data area, so “the flash content” is two regions with two different values and two different failure modes.

State first, force last

The code area’s protection is the family-standard SPC byte at 0x1FFFF800: 0xA5 means open, any other value means protected, and the option bytes remain readable in every mode, so the state is known from the first transaction. Under protection, debug and bootloader reads end in bus errors, and the only controller-level escape rewrites the SPC byte to 0xA5 at the price of a mass erase across the full megabyte. On a part whose value is concentrated in the data area, that trade is almost never worth making blind; we look for a surviving copy elsewhere first. The flash-lock notes for the F303RK describe the same mechanism in the mainstream family, and the dump notes on the 100-pin VE cover the mid-capacity sibling.

Delivering two regions honestly

A finished extraction returns the code area as a heximal and the data area as its own image, each with per-region checksums, plus the option byte configuration as found. Where the data area carries encrypted records, the unwrapping is a disassembly exercise documented separately, because the customer may want the data without the analysis. Verification programs a blank device from the code image and exercises the USB and CAN stacks, since connectivity firmware fails loudly when a page is missing. The readout standards govern what counts as verified, the extraction service pages set the commercial terms, and the controller cracking overview places this line among the families we handle.

Reading 768 KB of data area as evidence

The data area of the RG is large enough that its internal structure is usually visible without any decryption at all: parameter blocks have stride, log records have timestamps, and licence blobs sit at fixed offsets the code addresses directly. Reading it as evidence rather than as an undifferentiated blob changes both the extraction and the report. We map the regions the code actually references — from the disassembly of the code area, which is captured first for exactly this reason — and then read the data area with those references in hand, so the delivered image arrives annotated with what each region is for. Where records are encrypted, the cipher is characterised against the referenced regions rather than against the whole array, which narrows the analysis to bytes that matter. The 768 KB scale also changes verification: a blank device programmed from the code image will boot without the data area populated, but it will not behave, so functional verification on this part always includes a data-area restore and an exercise of the routines that read it. Customers using the data area for logs face one further question — whether historical records must survive the recovery or only the schema — and the answer changes the method, so we ask it before the first read rather than after. Annotation also protects the customer from a subtler failure: images delivered without region descriptions get reprogrammed in the wrong order by well-meaning tooling, and a data area written over by a code image is unrecoverable in practice. Our delivery therefore separates the two files physically and documents the programming order explicitly, with the code area first and the data area restored second, matching the order the original production line used. Where that order is unknown, we reconstruct it from the boot path before anything is programmed, because the reconstruction costs minutes and a wrong order costs the data area.

Send the marking and a description of what the data area is used for in your application. Knowing whether it holds one parameter page or a logging filesystem changes the plan more than any datasheet table does.