> For the complete documentation index, see [llms.txt](https://docs.mtoolstec.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mtoolstec.com/hardware/rfid-nfc-and-uhf-hardware/proxmark3-x/firmware-development.md).

# Build and Flash Firmware

Build the client and firmware together from the [RRG Proxmark3 repository](https://github.com/RfidResearchGroup/proxmark3). Keep the build revision recorded so that the client and installed firmware can be matched later.

## Prepare the Build Environment

Follow the upstream [installation instructions](https://github.com/RfidResearchGroup/proxmark3/tree/master/doc/md/Installation_Instructions) for your operating system. The project requires a native compiler, ARM cross compiler, Make, and the libraries used by the selected client configuration. Windows source builds commonly use [ProxSpace](https://github.com/Gator96100/ProxSpace).

```bash
git clone https://github.com/RfidResearchGroup/proxmark3.git
cd proxmark3
cp Makefile.platform.sample Makefile.platform
```

## Select the Proxmark3 X Target

Edit `Makefile.platform` so that these are the active platform settings:

```makefile
PLATFORM=PM3GENERIC
PLATFORM_EXTRAS=BTADDON
```

Disable the sample's active `PLATFORM=PM3RDV4` line. Keep only one active PLATFORM assignment. Do not enable FLASH, SMARTCARD, or other extras unless the actual hardware provides them.

The [Proxmark3 X Android guide](https://proxmark3x.mtoolstec.com/guides/use-proxmark3-x-on-android) specifies PM3GENERIC with BTADDON for custom builds. Confirm the board's flash capacity before applying a size override.

## Compile

```bash
make clean
make -j
```

Typical outputs include `client/proxmark3`, `bootrom/obj/bootrom.elf`, and `armsrc/obj/fullimage.elf`. Use the client and images from the same successful build.

## Flash over USB

Select Mode 0 and close other applications using the USB serial port. For the normal application-image update, use the repository helper:

```bash
./pm3-flash-fullimage /dev/ttyACM0
```

Replace the port with your actual serial device. If the updater instructs you to enter bootloader mode, hold the PM3 button while reconnecting USB and follow its prompts.

When a bootloader update is required, use:

```bash
./pm3-flash-bootrom /dev/ttyACM0
./pm3-flash-fullimage /dev/ttyACM0
```

Run the two updates sequentially and identify the port again if it changes. The bootloader helper unlocks the bootloader region; only use a bootrom image built for the confirmed hardware target. Avoid assuming that a factory RDV4-labelled package and a custom PM3GENERIC image are interchangeable.

## Verify

```bash
./pm3 /dev/ttyACM0
```

At the client prompt:

```
hw version
hw status
hf search
```

Check reported client, bootrom, and firmware versions. Test LF separately with `lf search` and then check Bluetooth if enabled. The original [firmware guide](https://proxmark3x.mtoolstec.com/guides/how-to-flash-firmware) remains available for product-specific update context.

If flashing cannot connect, check Mode 0, the cable, bootloader entry, serial permissions, and competing programs before selecting a different image.
