2021-12-31 18:42:15 +08:00
< a id = "Top" > < / a >
# 4. Advanced compilation parameters
# Table of Contents
- [4. Advanced compilation parameters ](#4-advanced-compilation-parameters )
- [Table of Contents ](#table-of-contents )
- [Client ](#client )
- [Firmware ](#firmware )
- [PLATFORM ](#platform )
- [PLATFORM_EXTRAS ](#platform_extras )
- [STANDALONE ](#standalone )
- [256kb versions ](#256kb-versions )
- [Next step ](#next-step )
2019-07-12 07:48:39 +08:00
The client and the Proxmark3 firmware should always be in sync.
Nevertheless, the firmware can be tuned depending on the Proxmark3 platform and options.
2022-02-27 00:15:32 +08:00
Indeed, the Iceman fork can be used on other Proxmark3 hardware platforms as well.
2019-07-12 07:48:39 +08:00
Via some definitions, you can adjust the firmware for a given platform, but also to add features like the support of the Blue Shark add-on or to select which standalone mode to embed.
2021-12-31 18:42:15 +08:00
2019-07-12 07:48:39 +08:00
## Client
2021-12-31 18:42:15 +08:00
^[Top](#top)
2019-07-12 07:48:39 +08:00
The client doesn't depend on the capabilities of the Proxmark3 it's connected to.
So you can use the same client for different Proxmark3 platforms, given that everything is running the same version.
2019-10-10 01:28:37 +08:00
It's possible to explicitly skip the Qt support in the compilation even if Qt is present on the host, with:
```
make clean
make SKIPQT=1
```
2020-04-29 07:41:22 +08:00
On Linux hosts, if the Bluez headers and library are present, the client will be compiled with native Bluetooth support. It's possible to explicitly skip Bluetooth support with:
```
make clean
make SKIPBT=1
```
2019-07-12 07:48:39 +08:00
## Firmware
2021-12-31 18:42:15 +08:00
^[Top](#top)
2019-07-12 07:48:39 +08:00
2021-01-14 21:23:00 +08:00
By default, the firmware is of course tuned for the Proxmark3 RDV4 device, which has built-in support for 256kb onboard flash SPI memory, Sim module (smart card support), FPC connector.
These features make it very different from all other Proxmark3 devices, there is non other like this one.
2019-07-12 07:48:39 +08:00
2020-11-06 02:23:20 +08:00
**Recommendation**: if you don't have a RDV4, we strongly recommend your device to have at least a 512kb arm chip, since this repo is crossing 256kb limit. There is still a way to skip parts to make it fit on a 256kb device, see below.
2019-07-12 07:48:39 +08:00
If you need to tune things and save the configuration, create a file `Makefile.platform` in the root directory of the repository, see `Makefile.platform.sample` .
For an up-to-date exhaustive list of options, you can run `make PLATFORM=` .
## PLATFORM
2021-12-31 18:42:15 +08:00
^[Top](#top)
2019-07-12 07:48:39 +08:00
Here are the supported values you can assign to `PLATFORM` in `Makefile.platform` :
2019-08-22 02:06:14 +08:00
| PLATFORM | DESCRIPTION |
|-----------------|--------------------------|
2021-01-14 21:23:00 +08:00
| PM3RDV4 (def) | Proxmark3 RDV4 |
| PM3GENERIC | Proxmark3 generic target |
2021-08-22 05:43:06 +08:00
| PM3ICOPYX | iCopy-X with XC3S100E |
2019-07-12 07:48:39 +08:00
By default `PLATFORM=PM3RDV4` .
2019-08-22 02:06:14 +08:00
The MCU version (256 or 512) will be detected automatically during flashing.
2019-08-21 01:39:24 +08:00
2019-07-12 07:48:39 +08:00
Known issues:
* 256kb Arm chip devices: The compiled firmware image from this repo may/will be too large for your device.
* PM3 Evo: it has a different led/button pin assignment. It tends to be messed up.
2021-04-14 03:06:21 +08:00
* Proxmark Pro: it has different fpga and unknown pin assignments. Unsupported.
2019-07-12 07:48:39 +08:00
## PLATFORM_EXTRAS
2021-12-31 18:42:15 +08:00
^[Top](#top)
2019-07-12 07:48:39 +08:00
Here are the supported values you can assign to `PLATFORM_EXTRAS` in `Makefile.platform` :
| PLATFORM_EXTRAS | DESCRIPTION |
|-----------------|----------------------------------------|
| BTADDON | Proxmark3 rdv4 BT add-on |
By default `PLATFORM_EXTRAS=` .
If you have installed a Blue Shark add-on on your RDV4, define `PLATFORM_EXTRAS=BTADDON` in your `Makefile.platform` .
## STANDALONE
2021-12-31 18:42:15 +08:00
^[Top](#top)
2019-07-12 07:48:39 +08:00
2022-02-27 00:15:32 +08:00
The Iceman repository gives you to easily choose which standalone mode to embed in the firmware.
2019-07-12 07:48:39 +08:00
Here are the supported values you can assign to `STANDALONE` in `Makefile.platform` :
| STANDALONE | DESCRIPTION |
|-----------------|----------------------------------------|
| | No standalone mode
2020-04-24 23:54:12 +08:00
| LF_EM4100EMUL | LF EM4100 simulator standalone mode - temskiy
2020-05-11 22:52:35 +08:00
| LF_EM4100RSWB | LF EM4100 read/write/clone/brute mode - Monster1024
2022-02-11 00:39:25 +08:00
| LF_EM4100RSWW | LF EM4100 read/write/clone/validate/wipe mode - Łukasz "zabszk" Jurczyk
2020-04-24 23:54:12 +08:00
| LF_EM4100RWC | LF EM4100 read/write/clone mode - temskiy
2019-07-12 07:48:39 +08:00
| LF_HIDBRUTE | HID corporate 1000 bruteforce - Federico dotta & Maurizio Agazzini
2021-07-25 14:25:59 +08:00
| LF_HIDFCBRUTE | LF HID facility code bruteforce - ss23
2020-09-06 20:56:28 +08:00
| LF_ICEHID | LF HID collector to flashmem - Iceman1001
2021-06-23 17:42:33 +08:00
| LF_NEXID | Nexwatch credentials detection mode - jrjgjk & Zolorah
2020-04-24 23:54:12 +08:00
| LF_PROXBRUTE | HID ProxII bruteforce - Brad Antoniewicz
2021-09-05 04:13:54 +08:00
| LF_SAMYRUN (def)| HID26 read/clone/sim - Samy Kamkar
2021-06-23 17:42:33 +08:00
| LF_SKELETON | standalone mode skeleton - Iceman1001
| LF_THAREXDE | LF EM4x50 simulator/read standalone mode - tharexde
2020-04-24 23:54:12 +08:00
| HF_14ASNIFF | 14a sniff storing to flashmem - Micolous
2022-01-08 08:07:29 +08:00
| HF_15SNIFF | 15693 sniff storing to flashmem - Glaser
2020-09-06 20:56:28 +08:00
| HF_AVEFUL | MIFARE Ultralight read/simulation - Ave Ozkal
2020-04-24 23:54:12 +08:00
| HF_BOG | 14a sniff with ULC/ULEV1/NTAG auth storing in flashmem - Bogito
2021-03-15 07:58:38 +08:00
| HF_CRAFTBYTE | UID stealer - Emulates scanned 14a UID - Anze Jensterle
2020-04-24 23:54:12 +08:00
| HF_COLIN | Mifare ultra fast sniff/sim/clone - Colin Brigato
2020-09-06 20:56:28 +08:00
| HF_ICECLASS | iCLASS 4-1 mode sim/read & dump/loclass/glitch & config to flashmem - Iceman1001
2022-02-14 19:19:20 +08:00
| HF_LEGIC | HF Legic Prime Read/Store/Sim standalone - uhei
| HF_LEGICSIM | HF Legic Prime Simulate standalone - uhei
2020-04-24 23:54:12 +08:00
| HF_MATTYRUN | Mifare sniff/clone - Matías A. Ré Medina
2021-08-08 16:11:57 +08:00
| HF_MFCSIM | Simulate Mifare Classic 1k card storing in flashmem - Ray Lee
2021-09-05 04:13:54 +08:00
| HF_MSDSAL | EMV Read and emulation - Salvador Mendoza
2021-07-07 19:36:23 +08:00
| HF_REBLAY | 14A relay over BT - Salvador Mendoza
2020-11-02 10:14:10 +08:00
| HF_TCPRST | IKEA Rothult ST25TA, Standalone Master Key Dump/Emulation - Nick Draffen
2021-05-06 05:26:41 +08:00
| HF_TMUDFORD | Read and emulate ISO15693 card UID - Tim Mudford
2020-04-24 23:54:12 +08:00
| HF_YOUNG | Mifare sniff/simulation - Craig Young
2021-11-21 05:01:09 +08:00
| DANKARMULTI | Standalone mode that bakes together multiple other standalone modes. - dankar
2019-07-12 07:48:39 +08:00
2021-09-05 04:13:54 +08:00
By default `STANDALONE=LF_SAMYRUN` .
2019-07-12 07:48:39 +08:00
2020-11-06 02:23:20 +08:00
## 256kb versions
2021-12-31 18:42:15 +08:00
^[Top](#top)
2020-11-06 02:23:20 +08:00
If you own a Proxmark3 Easy with only 256kb, you can use a few definitions to help you getting a smaller firmware.
2021-01-14 21:23:00 +08:00
First thing is of course to use the `PLATFORM=PM3GENERIC` .
2020-11-06 02:23:20 +08:00
Adding `PLATFORM_SIZE=256` will provoke an error during compilation of the recovery image if your image is too big, so you can detect the problem before trying to flash the Proxmark3, e.g.
```
[=] GEN proxmark3_recovery.bin
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Firmware image too large for your platform! 262768 > 262144
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
```
You can skip the standalone support by indicating `STANDALONE=` and
a series of `SKIP_*` allow to skip some of the functionalities and to get a smaller image.
| Definitions | Rough estimation of the saved space |
|---------------------|-------------------------------------|
|STANDALONE= | 3.6kb
|SKIP_LF=1 | 25.8kb
|SKIP_HITAG=1 | 24.2kb
|SKIP_EM4x50=1 | 2.9kb
|SKIP_ISO15693=1 | 3.2kb
|SKIP_LEGICRF=1 | 3.9kb
|SKIP_ISO14443b=1 | 3.7kb
|SKIP_ISO14443a=1 | 63.0kb
|SKIP_ICLASS=1 | 10.5kb
|SKIP_FELICA=1 | 4.0kb
|SKIP_NFCBARCODE=1 | 1.4kb
|SKIP_HFSNIFF=1 | 0.5kb
|SKIP_HFPLOT=1 | 0.3kb
2021-12-24 22:24:32 +08:00
|SKIP_ZX8211=1 | unknown yet
2021-07-10 15:31:53 +08:00
2020-11-06 02:23:20 +08:00
So for example, at the time of writing, this is a valid `Makefile.platform` compiling an image for 256k:
```
2021-01-14 21:23:00 +08:00
PLATFORM=PM3GENERIC
2020-11-06 02:23:20 +08:00
PLATFORM_SIZE=256
STANDALONE=
2021-01-10 07:35:40 +08:00
SKIP_HITAG=1
2020-11-06 02:23:20 +08:00
SKIP_FELICA=1
```
Situation might change when the firmware is growing of course, requiring to skip more elements.
2020-11-06 05:26:47 +08:00
Last note: if you skip a tech, be careful not to use a standalone mode which requires that same tech, else the firmware size reduction won't be much.
2019-07-12 07:48:39 +08:00
## Next step
2021-12-31 18:42:15 +08:00
^[Top](#top)
2019-07-12 07:48:39 +08:00
See [Compilation instructions ](/doc/md/Use_of_Proxmark/0_Compilation-Instructions.md )