CEP: change to SKIP_CEP=1 and clean a bit the doc

This commit is contained in:
Philippe Teuwen committed 2026-09-26 21:16:19 +02:00
1 parent 16024ed4a1
commit 12296f4afb
3 files changed
+26 -48

No files matched your search

+19 -13
View File
@@ -50,8 +50,6 @@ Known definitions:
+--------------------------------------------+
| BWM | PM5 Battery Wireless Mod |
+--------------------------------------------+
| SKIP_CEP | PM5 disable Flipper Zero (CEP)|
+--------------------------------------------+
| NO_LOWBATT_BEEP | PM5 disable low-batt beep|
+--------------------------------------------+
|NO_LOWBATT_SHUTDOWN| PM5 no low-batt cutoff |
@@ -73,6 +71,10 @@ or if you have a Proxmark 3 RDV4 with the BT add-on:
PLATFORM=PM3RDV4
PLATFORM_EXTRAS=BTADDON
or if you have a Proxmark 5 with the BWM add-on:
PLATFORM=PM5
PLATFORM_EXTRAS=BWM
Default standalone mode is $(DEFAULT_STANDALONE).
To disable standalone modes, set explicitly an empty STANDALONE:
STANDALONE=
@@ -82,6 +84,7 @@ PLATFORM_SIZE=256
to be warned if the image is too big for your device
and you can specify which parts to skip in order to reduce the size:
SKIP_CEP=1
SKIP_LF=1
SKIP_HITAG=1
SKIP_EM4x50=1
@@ -187,7 +190,7 @@ else ifeq ($(PLATFORM),PM5)
FPGA_BITSTREAMS = fpga_pm3_hf.bit # TODO DXL 虽然可以不把打包比特流,但是还是得把FPGA的版本信息给生成,让EXE依赖。
SKIP_FPGA_EMBED = true # important!!! disable the fpga bit files pack to arm!
SKIP_COMPRESSION = true # Skip data section compress. The new mcu has enough flash space.
PLATFORM_DEFS = -DWITH_FLASH -DPM5 -DCHIP_AT32F435_37 -DWITH_CEP # TODO 暂时不要编译i2c -DWITH_SMARTCARD
PLATFORM_DEFS = -DPM5 -DCHIP_AT32F435_37 -DWITH_FLASH # TODO 暂时不要编译i2c -DWITH_SMARTCARD
PLTNAME = Proxmark5
PLATFORM_FPGA = GW1NR-LV2MG49GC6/i5
else
@@ -229,14 +232,6 @@ ifneq (,$(findstring BWM,$(PLATFORM_EXTRAS_TMP)))
PLATFORM_DEFS += -DWITH_BWM_FORWARD -DWITH_BWM_STATUS -DWITH_PM5_PWR_LED -DWITH_PM5_AUTOOFF -DWITH_BWM_LOWBATT_BEEP -DWITH_PM5_LOWBATT_SHUTDOWN
PLATFORM_EXTRAS_TMP := $(strip $(filter-out BWM,$(PLATFORM_EXTRAS_TMP)))
endif
# CEP is on by default for PM5 (Flipper Zero USB link); SKIP_CEP disables it
ifneq (,$(findstring SKIP_CEP,$(PLATFORM_EXTRAS_TMP)))
ifneq ($(PLATFORM),PM5)
$(error PLATFORM_EXTRAS token SKIP_CEP is only valid on PLATFORM=PM5)
endif
PLATFORM_DEFS := $(filter-out -DWITH_CEP,$(PLATFORM_DEFS))
PLATFORM_EXTRAS_TMP := $(strip $(filter-out SKIP_CEP,$(PLATFORM_EXTRAS_TMP)))
endif
ifneq (,$(findstring NO_LOWBATT_SHUTDOWN,$(PLATFORM_EXTRAS_TMP)))
ifneq ($(PLATFORM),PM5)
$(error PLATFORM_EXTRAS token NO_LOWBATT_SHUTDOWN is only valid on PLATFORM=PM5)
@@ -256,6 +251,17 @@ ifneq (,$(PLATFORM_EXTRAS_TMP))
$(error Unknown PLATFORM_EXTRAS token(s): $(PLATFORM_EXTRAS_TMP))
endif
# Proxmark5 specific support
ifeq ($(SKIP_CEP),1)
ifneq ($(PLATFORM),PM5)
$(error SKIP_CEP token is only valid on PLATFORM=PM5)
endif
else
ifeq ($(PLATFORM),PM5)
PLATFORM_DEFS += -DWITH_CEP
endif
endif
# common LF support
ifneq ($(SKIP_LF),1)
PLATFORM_DEFS += -DWITH_LF
@@ -340,8 +346,8 @@ ifneq (,$(findstring WITH_FPC_USART_,$(PLATFORM_DEFS)))
PLATFORM_DEFS += -DUSART_BAUD_RATE=$(USART_BAUD_RATE)
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)))))
PLATFORM_DEFS_INFO = $(strip $(filter-out STANDALONE%, $(subst -D,,$(subst -DWITH_,,$(PLATFORM_DEFS)))))
PLATFORM_DEFS_INFO_STANDALONE = $(strip $(subst STANDALONE_,, $(filter STANDALONE%, $(subst -D,,$(subst -DWITH_,,$(PLATFORM_DEFS))))))
# Check that only one Standalone mode has been chosen
ifneq (,$(word 2, $(PLATFORM_DEFS_INFO_STANDALONE)))
+6 -34
View File
@@ -7,9 +7,6 @@ app, talk to the PM5 over a one-shot UART handshake followed by standard PM3
NG command/response frames carried over SPI. Everything below is **PM5-only**
and is compiled in by default when building for PM5.
See [GH issue #3667](https://github.com/RfidResearchGroup/proxmark3/issues/3667)
for the full protocol writeup and open hardware-verification items.
## Contents
- [Build](#build)
@@ -23,36 +20,13 @@ for the full protocol writeup and open hardware-verification items.
## Build
```
make clean
make PLATFORM=PM5
make client # or your usual client build
```
CEP is independent of `BWM` — disable it with `SKIP_CEP` if you don't want it,
with or without BWM:
```
make PLATFORM=PM5 PLATFORM_EXTRAS="BWM SKIP_CEP"
```
Or set it persistently in `Makefile.platform`:
```
PLATFORM=PM5
PLATFORM_EXTRAS=SKIP_CEP
```
> [!NOTE]
> With `PLATFORM_EXTRAS=SKIP_CEP` the firmware ignores the Flipper entirely —
> the CEP port stays inert, same as before this feature existed.
Build as usual, CEP is available by default. (`SKIP_CEP=1` to remove CEP support)
---
## Physical hookup
- Use the **side** USB-C port (the button-side port stays reserved for
flashing/DFU).
- Use the **side** USB-C port.
- Attach a Flipper Zero fitted with the Flipper transfer module/cable, running
the Proxmark5_FlipperZero_FAP app.
- The Flipper supplies 5V to the PM5 via USB OTG when the app launches.
@@ -62,7 +36,7 @@ PLATFORM_EXTRAS=SKIP_CEP
## What works today
- The FAP handshake completing (app leaves "connecting").
- Standard PM3 NG commands that don't touch the antenna frontend — `hw
- Standard commands that don't touch the antenna frontend — `hw
version`, `hw status`, memory/flash operations, etc.
## What doesn't (yet)
@@ -70,7 +44,7 @@ PLATFORM_EXTRAS=SKIP_CEP
- Any RF operation over this link — `hf`/`lf` reads, the FAP's "Read Hitag2"
menu item. These need the real PM5 FPGA/RF configuration, which isn't
shipped in this repo. Tracked separately, out of scope for the CEP
transport itself — see GH issue #3667.
transport itself.
---
@@ -89,10 +63,8 @@ PLATFORM_EXTRAS=SKIP_CEP
## Notes
- CEP uses its own reply-routing flag (`g_reply_via_cep`), independent of
BWM's (`g_reply_via_fpc`) — this is what lets both transports run
concurrently on hardware that has both fitted.
- CEP uses its own reply-routing flag (`g_reply_via_cep`).
- The SPI bit-order/clock-phase settings are a best-effort port from prior
bring-up code, pending confirmation against real Flipper traffic (logic
analyzer). If the handshake never completes, this is the first thing to
check — see GH issue #3667.
check.
+1 -1
View File
@@ -289,7 +289,7 @@ typedef struct {
bool compiled_with_bwm : 1; // PM5 built with PLATFORM_EXTRAS=BWM (battery/wireless module)
// Appended in version 13.
bool compiled_with_cep : 1; // PM5 built with WITH_CEP (Flipper Zero, Type-C extended port; on by default, SKIP_CEP to disable)
bool compiled_with_cep : 1; // PM5 built with CEP (Flipper Zero, Type-C extended port; on by default, SKIP_CEP=1 to disable)
} PACKED capabilities_t;
// Bump this whenever a command payload changes shape, so a mismatched client and
// firmware refuse to talk instead of misparsing each other.