mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 18:24:27 +08:00
133 lines
4.3 KiB
Text
133 lines
4.3 KiB
Text
define KNOWN_PLATFORMS
|
|
|
|
+==========================================================+
|
|
| PLATFORM | DESCRIPTION |
|
|
+==========================================================+
|
|
| PM3RDV4 (def) | Proxmark3 rdv4 with AT91SAM7S512 |
|
|
+----------------------------------------------------------+
|
|
| PM3EVO | Proxmark3 EVO with AT91SAM7S512 |
|
|
+----------------------------------------------------------+
|
|
| PM3EASY | Proxmark3 rdv3 Easy with AT91SAM7S256 |
|
|
+----------------------------------------------------------+
|
|
| PM3RDV2 | Proxmark3 rdv2 with AT91SAM7S512 |
|
|
+----------------------------------------------------------+
|
|
| PM3OLD256 | Proxmark3 V1 with AT91SAM7S256 |
|
|
+----------------------------------------------------------+
|
|
| PM3OLD512 | Proxmark3 V1 with AT91SAM7S512 |
|
|
+----------------------------------------------------------+
|
|
|
|
+==========================================================+
|
|
| PLATFORM_EXTRAS | DESCRIPTION |
|
|
+==========================================================+
|
|
| BTADDON | Proxmark3 rdv4 BT add-on |
|
|
+----------------------------------------------------------+
|
|
|
|
Options to define platform:
|
|
(1) Run make with PLATFORM specified as follows:
|
|
make PLATFORM=PM3EASY
|
|
|
|
(2) Save a file called Makefile.platform with contents:
|
|
PLATFORM=PM3EASY
|
|
|
|
or if you have a Proxmark 3 RDV4 with the BT add-on:
|
|
PLATFORM=PM3RDV4
|
|
PLATFORM_EXTRAS=BTADDON
|
|
|
|
!! Make sure to "make clean" when you change platform settings !!
|
|
|
|
endef
|
|
|
|
PLTNAME = Unknown Platform
|
|
|
|
ifeq ($(PLATFORM),PM3RDV4)
|
|
MCU = AT91SAM7S512
|
|
PLATFORM_DEFS = -DWITH_SMARTCARD -DWITH_FLASH
|
|
PLTNAME = Proxmark3 rdv4
|
|
else ifeq ($(PLATFORM),PM3EVO)
|
|
MCU = AT91SAM7S512
|
|
PLTNAME = Proxmark3 EVO
|
|
else ifeq ($(PLATFORM),PM3EASY)
|
|
MCU = AT91SAM7S256
|
|
PLTNAME = Proxmark3 rdv3 Easy
|
|
else ifeq ($(PLATFORM),PM3RDV2)
|
|
MCU = AT91SAM7S512
|
|
PLTNAME = Proxmark3 rdv2
|
|
else ifeq ($(PLATFORM),PM3OLD256)
|
|
MCU = AT91SAM7S256
|
|
PLTNAME = Proxmark3 V1 with AT91SAM7S256
|
|
else ifeq ($(PLATFORM),PM3OLD512)
|
|
MCU = AT91SAM7S512
|
|
PLTNAME = Proxmark3 V1 with AT91SAM7S512
|
|
else
|
|
$(error Invalid or empty PLATFORM: $(PLATFORM). Known platforms: $(KNOWN_PLATFORMS))
|
|
endif
|
|
|
|
# parsing additional PLATFORM_EXTRAS tokens
|
|
PLATFORM_EXTRAS_TMP:=$(PLATFORM_EXTRAS)
|
|
ifneq (,$(findstring BTADDON,$(PLATFORM_EXTRAS_TMP)))
|
|
PLATFORM_DEFS += -DWITH_FPC_USART_HOST
|
|
PLATFORM_EXTRAS_TMP := $(strip $(filter-out BTADDON,$(PLATFORM_EXTRAS_TMP)))
|
|
endif
|
|
ifneq (,$(findstring FPC_USART_DEV,$(PLATFORM_EXTRAS_TMP)))
|
|
PLATFORM_DEFS += -DWITH_FPC_USART_DEV
|
|
PLATFORM_EXTRAS_TMP := $(strip $(filter-out FPC_USART_DEV,$(PLATFORM_EXTRAS_TMP)))
|
|
endif
|
|
ifneq (,$(PLATFORM_EXTRAS_TMP))
|
|
$(error Unknown PLATFORM_EXTRAS token(s): $(PLATFORM_EXTRAS_TMP))
|
|
endif
|
|
|
|
# common LF support
|
|
PLATFORM_DEFS += \
|
|
-DWITH_LF \
|
|
-DWITH_HITAG
|
|
|
|
# common HF support
|
|
PLATFORM_DEFS += \
|
|
-DWITH_ISO15693 \
|
|
-DWITH_LEGICRF \
|
|
-DWITH_ISO14443b \
|
|
-DWITH_ISO14443a \
|
|
-DWITH_ICLASS \
|
|
-DWITH_FELICA \
|
|
-DWITH_HFSNIFF
|
|
|
|
# Standalone mode
|
|
# !! Choose only one !!
|
|
PLATFORM_DEFS += -DWITH_STANDALONE_LF_SAMYRUN
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_ICERUN
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_PROXBRUTE
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_LF_HIDBRUTE
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_YOUNG
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_MATTYRUN
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_COLIN
|
|
#PLATFORM_DEFS += -DWITH_STANDALONE_HF_BOG
|
|
|
|
$(info $(findstring WITH_STANDALONE_*,$(PLATFORM_DEFS)))
|
|
|
|
# Misc
|
|
#PLATFORM_DEFS += -DWITH_LCD
|
|
|
|
|
|
# Add flags dependencies :
|
|
|
|
# WITH_FPC_USART_* needs WITH_FPC_USART :
|
|
ifneq (,$(findstring WITH_FPC_USART_,$(PLATFORM_DEFS)))
|
|
PLATFORM_DEFS += -DWITH_FPC_USART
|
|
endif
|
|
|
|
PLATFORM_DEFS_INFO = $(strip $(filter-out STANDALONE%, $(subst -DWITH_,,$(PLATFORM_DEFS))))
|
|
PLATFORM_DEFS_INFO_STANDALONE = $(strip $(subst STANDALONE_,, $(filter STANDALONE%, $(subst -DWITH_,,$(PLATFORM_DEFS)))))
|
|
|
|
# Check that only one Standalone mode has been chosen
|
|
ifneq (,$(word 2, $(PLATFORM_DEFS_INFO_STANDALONE)))
|
|
$(error You must choose only one Standalone mode!: $(PLATFORM_DEFS_INFO_STANDALONE))
|
|
endif
|
|
|
|
|
|
export PLATFORM
|
|
export PLATFORM_EXTRAS
|
|
export PLTNAME
|
|
export MCU
|
|
export PLATFORM_DEFS
|
|
export PLATFORM_DEFS_INFO
|
|
export PLATFORM_DEFS_INFO_STANDALONE
|