Commit Graph
60 Commits
Author SHA1 Message Date
Tom HarknessandClaude Sonnet 5 f1cb495208 Fix CEP main-loop hang: start the ticks timer before I2C use, re-enable WITH_CEP
cep_attach_poll() (and cep_init()) call I2C_BufferReadRaw()/I2C_init(true),
which spin on the shared ticks timer via WaitUS()/WaitMS(). That timer is
routinely stopped with StopTicks() by LF/HF protocol code once it's done
with precision timing (em4x50.c, legicrf.c, hitag_common.c, lfsampling.c,
etc). cep_attach_poll() runs unconditionally every 50ms in the main loop
with no idea whether the timer is currently running - if its poll lands in
a window where something just called StopTicks(), WaitTicks()'s
`while (GetTicks() < target)` spins forever on a frozen counter, hanging
the entire main loop irrecoverably. `hf search` cycles through many such
probes, giving this poll many chances to land in that window, matching the
reported "hf search hangs the PM5, needs a battery pull" regression - and
since the poll runs regardless of Flipper attachment, merely compiling in
WITH_CEP was enough to trigger it.

bwm_lowbatt_poll() (armsrc/bwm_charger.c) is the same shape of periodic
main-loop I2C poller and already guards against exactly this by calling
StartTicks(); I2C_init(true); itself immediately before every I2C access.
Mirror that convention in cep_attach_poll() and cep_init().

Re-enables WITH_CEP as the PM5 default (reverts f88880fc6's temporary
disable) now that the underlying bug is fixed. SKIP_CEP=1 remains available
for anyone who wants to opt out at build time regardless.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-28 09:32:59 +02:00
Philippe Teuwen f88880fc61 Temporarely disable CEP due to bug affecting normal usage 2026-09-27 22:26:11 +02:00
Philippe Teuwen 12296f4afb CEP: change to SKIP_CEP=1 and clean a bit the doc 2026-09-26 21:16:19 +02:00
Tom HarknessandClaude Sonnet 5 16024ed4a1 Make WITH_CEP default-on for PM5, add SKIP_CEP to opt out
doegox asked on PR #3668 whether CEP really needs to be guarded by a
compile flag, suggesting it ship on by default with a SKIP_CEP opt-out
instead - mirrors the existing NO_LOWBATT_SHUTDOWN/NO_LOWBATT_BEEP
opt-out pattern in common_arm/Makefile.hal. WITH_CEP is now baked into
PM5's base PLATFORM_DEFS; PLATFORM_EXTRAS=SKIP_CEP filters it back out.

No change to armsrc/Makefile (already keys off the WITH_CEP define, not
the old extras token) or to the CEP transport logic itself. Updated the
PM5-FLIPPER-USAGE doc, the CHANGELOG entry, and one stale comment in
include/pm3_cmd.h that referenced the old opt-in token.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 19:55:50 +02:00
Tom HarknessandClaude Sonnet 5 2b5e3e51eb Add PM5 CEP transport for Flipper Zero (WITH_CEP)
Wire up the previously-dead Flipper Zero handshake/SPI code from
at32_unit_test.c into a real WITH_CEP platform extra, independent of
BWM (new g_reply_via_cep flag, not reusing BWM's g_reply_via_fpc, so
both transports can run concurrently).

Fixes a real reconnect bug found during hardware bring-up: the
handshake listener was gated on a CC-controller attach edge that
didn't reliably fire on every FAP relaunch, requiring a physical
cable replug to reconnect. Now watches for a fresh incoming byte any
time the link reports attached, with a bounded receive timeout so a
stray byte can never hang the main loop.

RF/FPGA-dependent functionality (hf/lf reads) is out of scope here -
tracked separately. Closes #3667.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 09:45:51 -04:00
Philippe Teuwen fc024c8038 Fix bug when calling directly recovery Makefile 2026-09-25 22:43:58 +02:00
Niel Nielsen 3401d59513 Add multiple platform definitions for BWM
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-23 13:44:57 +02:00
Niel Nielsen b7026e42af Simplify FPGA settings in Makefile.hal
Removed unnecessary platform definitions and comments related to low-battery safety.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-09-23 13:44:57 +02:00
Mistial DeveloperandGPT-Daybreak Blue 957896a926 build(desfire): make emulator test hook optional
Exclude the USB test dispatcher and queued-random support from normal firmware builds. Enable them with ENABLE_HFMFDESETEST=1 when running emulator vectors.

Co-Authored-By: GPT-Daybreak Blue <noreply@openai.com>
2026-09-17 00:08:06 +02:00
iceman1001 199c3f107c fix image too large for 256kb devices by adding guards 2026-09-16 10:32:48 +02:00
Niel Nielsen d35ddce206 Update low-battery options in Makefile.hal
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Niel Nielsen 98abc5d5f7 Clarify low-battery options in Makefile.hal
Updated comments for clarity on low-battery options.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-28 14:14:29 +02:00
Niel Nielsen e71f37ef32 Remove WITH_BWM_FORWARD from PLATFORM_DEFS
Removed the conditional definition for WITH_BWM_FORWARD in PLATFORM_DEFS.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-26 16:07:37 +02:00
Niel Nielsen 7f9619eb7d Add files via upload
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-26 16:07:37 +02:00
Niel Nielsen ee0c841556 Add WITH_PM5_AUTOOFF to PLATFORM_DEFS
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-25 12:43:53 +02:00
Niel Nielsen 4d529bc4d7 CHANGE: Battery temp to Temp (gauge), ADD: Dim green LED when on battery only 2026-08-24 21:05:00 +02:00
Niel Nielsen 1f09027bec Update PLATFORM_DEFS in Makefile.hal
Removed BWM_LOWBATT_BEEP definition from PLATFORM_DEFS.

Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-23 20:41:56 +02:00
Niel Nielsen 190ed8a990 ADD: BWM status includes AW32001ECSR registerd, Charging set to 256mAh and keeps BWM safety guards for temperature 2026-08-23 20:31:01 +02:00
Niel Nielsen 165e44b1ba Add WITH_BWM_STATUS to PLATFORM_DEFS
Signed-off-by: Niel Nielsen <nieldk@gmail.com>
2026-08-23 11:29:30 +02:00
Philippe Teuwen 4e684cb4d3 PM5: Detect incompatible PLATFORM_EXTRAS 2026-08-19 17:52:15 +02:00
dxl d286946d0f Update the Makefile support for ARM 2026-08-19 15:51:53 +02:00
Sujit Konapur 0577f6f321 fix: use strip() when comparing PLATFORM_DEFS to avoid spurious rebuilds
PLATFORM_DEFS is built with += on an initially empty variable, which
produces a leading space in GNU make. The cached value written to
.Makefile.options.cache has no leading space, so the ifneq comparison
always evaluates to true, causing PLATFORM_CHANGED=true on every
invocation and triggering a clean of bootrom/armsrc/recovery after
every build.
2026-03-09 23:26:45 -07:00
Philippe Teuwen 64247b33b1 Init PLATFORM_DEFS 2026-03-01 21:00:05 +01:00
Aaron Tulino (Aaronjamt) c0e82539f2 [hf seos] Simulate support 2025-12-21 04:26:44 -07:00
iceman1001 2d610b8dc0 text & style 2025-06-08 10:02:00 +02:00
Jakub Kramarz 9744f8afbb Add option to override default USART baud rate in platform settings 2025-05-09 15:53:30 +02:00
douniwan5788 80b9f6bb4d refactor: Renamed WITH_NO_COMPRESSION to WITH_COMPRESSION for consistent style 2024-09-04 22:48:55 +08:00
douniwan5788 9dd5b66c0a fix: FPGA config for ICOPYX 2024-08-26 20:56:36 +08:00
douniwan5788 413a17a7a6 feature: Make the FPGA bitstreams working with SKIP_* define.
Now, you can enable at least two of your favorite technologies (such as LF and HF 14443A) attached a standalone mode and still have spare ROM space for other functionalities on a Proxmark3 Easy with a 256KiB ROM.
2024-08-26 20:55:59 +08:00
douniwan5788 5d66bcfd75 fix: WITH_EM4x70. Get rid of the dependency on WITH_ICLASS. 2024-08-26 20:55:58 +08:00
francesco-scar 2ba0fbdcde Added led order parameter (for Proxmark3 Easy board) 2024-02-18 12:57:26 +01:00
wh201906 8fc3130a9f Add smartcard definition in PLATFORM_EXTRAS 2023-12-09 15:33:59 +08:00
iceman1001 7558846e76 text 2023-07-23 23:47:22 +02:00
d18c7db c59bdec4f2 Unified fpga folders 2023-05-30 19:47:27 +02:00
Henry Gabryjelski 5784c8de77 Update USB Serial Number from SPI flash's uniqueID
Also allow flash to be separately enabled via PLATFORM_EXTRAS.

NOTE: this does *NOT* enable the serial number
in the bootrom.  Still investigating options there.
2023-02-17 17:07:13 -08:00
Alejandro 474aaed4b7 Added a proper way to check if it is rdv4 fw 2023-01-24 23:01:28 +01:00
merlokk 541c060a5d hf read adc low level command 2022-06-25 00:36:42 +03:00
Philippe Teuwen 30aa7aa7d1 Adapting license headers, WIP 2022-01-08 00:40:52 +01:00
iceman1001 49ee82be19 zx now builds after fixing corrent header. 2021-12-24 15:24:32 +01:00
iceman1001 69ea599fee skeleton for ZX8211 2021-12-24 13:32:28 +01:00
Philippe Teuwen 0ed190936d Show source version in the makefile logs 2021-09-05 01:18:42 +02:00
Philippe Teuwen e79fb92074 Add fpga-xc3s100e and icopyx support 2021-08-21 23:45:46 +02:00
Philippe Teuwen 49e32a12ec Add warning for deprecated PM3OTHER 2021-01-14 14:41:08 +01:00
iceman1001 d7baee2f0c swapped PM3OTHER -> PM3GENERIC, while keeping PM3OTHER functionalitwise for backwards compat. 2021-01-14 14:23:00 +01:00
gator96100 f4c632bd31 Added DEBUG_ARM flag 2020-12-30 00:19:21 +01:00
gator96100 8c29c4231b Allow generation of debug information when using no compression 2020-12-29 03:30:57 +01:00
gator96100 11567dc2e3 Added option for running with uncompressed .data section. Thanks @doegox 2020-12-28 22:48:41 +01:00
Christian Molson 614ab55809 Initial commit for em4x70 support.
Initially I only have an em4x70 variant used for car transponders.
Also known as the ID48.
2020-12-05 17:47:03 -05:00
Philippe Teuwen e6d1e3bbfc Makefile: fix unnecessary recompilations when no Standalone mode is defined 2020-12-01 01:23:36 +01:00
iceman1001 c9bfb5c10b LCD support is conditional 2020-11-30 12:25:53 +01:00