Commit Graph
22340 Commits
Author SHA1 Message Date
s00se 0482fa8757 Add API check to Android spinlock shim
Android spinlock shim not needed on modern (API 24+) Android, this fixes compiling on Termux

Signed-off-by: s00se <95649696+s00se@users.noreply.github.com>
2026-08-19 20:04:03 -06:00
Philippe Teuwen cb5b3b65c8 pm5 doc: cmake for ARM 2026-08-19 22:56:46 +02:00
Philippe Teuwen 4da4eb706a Fix bug in bootrom.bin target 2026-08-19 22:18:48 +02:00
Philippe Teuwen fbfe53d0bb update pm5 doc 2026-08-19 22:02:28 +02:00
Nemanja Nedeljkovic 6da7c77427 feat(pm5): report AT32 MCU, flash size and PM5 target in hw version/status
`hw version` and `hw status` decoded the reported chip id as an Atmel AT91
CIDR. On PM5 (AT32) the id is an ARM DBGMCU IDCODE, so it showed
"MCU Unknown", a bogus flash size (32 KB / 973% used) and "PM3 GENERIC".

- Client: when IfPm5(), print MCU "AT32F437" and the real flash size, and add
  a "PM5" target line, instead of running the AT91 decode.
- Firmware: the flash size can't be derived from the AT32 IDCODE, so the device
  now sends GetChipFlashSize(). It is appended AFTER the version string in the
  CMD_VERSION reply, so the wire layout is unchanged and it stays compatible in
  both directions (old client ignores the trailing bytes; new client length-
  guards and treats a missing value as 0). GetChipFlashSize() already exists for
  both AT91 and AT32.
2026-08-19 21:49:43 +02:00
Philippe Teuwen 06bc3239ab Proxmark5 instructions, WIP 2026-08-19 21:40:15 +02:00
Philippe Teuwen caa76f57b3 Fix pm5 recovery image 2026-08-19 19:28:17 +02:00
dxl 86dfdfff89 Fixed a bug in reading hitagU and hitagS on RDV4. 2026-08-19 18:53:35 +02:00
iceman1001 75c2803d30 Corrected the file extension 2026-08-19 18:48:12 +02:00
Philippe Teuwen 4e684cb4d3 PM5: Detect incompatible PLATFORM_EXTRAS 2026-08-19 17:52:15 +02:00
Philippe Teuwen 827fce4839 Use ARRAYLEN when possible 2026-08-19 15:51:54 +02:00
Philippe Teuwen 5518e6af77 Fix Flash_UniqueID 2026-08-19 15:51:54 +02:00
Philippe Teuwen 6863314019 Remove tabs 2026-08-19 15:51:54 +02:00
Philippe Teuwen 52af3f11e2 rename a couple of commands 2026-08-19 15:51:54 +02:00
Philippe Teuwen b6752e9dde compile CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT only for pm5 2026-08-19 15:51:54 +02:00
Philippe Teuwen f82ac61e78 Prompt the user when flash_suggest_update_bootloader()
pm3line_init() delayed to not install signal handlers on other usages than interactive client
2026-08-19 15:51:54 +02:00
dxl 2dfe6c85a4 Record all remarks related to Proxmark5 to Proxmark5.md 2026-08-19 15:51:54 +02:00
dxl d064f9a310 Change HITAG_T_WAIT_FIRST to 350(See datasheet) so that PM5 can read hitagu normally. 2026-08-19 15:51:54 +02:00
dxl a286002d27 Refactor ISO14443A DMA RX to use cross-platform buffer helpers
Replace the hard-coded AT91 PDC register access in SniffIso14443a() with
cross-platform helpers for the RX double-buffer status/refresh, so the
sniffer no longer depends on AT91-specific registers.

- Add FPGA_SSC_DMA_RX_{Primary,Secondary}_Done and
  FPGA_SSC_DMA_RX_Refresh_{Both,Secondary} to fpga_apis.h.
- AT91: primary maps to PDC RPR/RCR, secondary ("next") to RNPR/RNCR.
- AT32: no double buffer, so the primary path is a no-op and all re-arming
  is done through the secondary (single-shot DMA re-arm).
2026-08-19 15:51:53 +02:00
dxl 676bc467cd Deleted unused variable 'maxDataLen' from SniffIso14443a() 2026-08-19 15:51:53 +02:00
dxl 7ef2d7b5b7 Moved startup_at32f435_437.s from armlib to armsrc 2026-08-19 15:51:53 +02:00
Philippe Teuwen 86b9e4d108 Merge: hardware abstraction layer for ARM 2026-08-19 15:51:53 +02:00
dxl d286946d0f Update the Makefile support for ARM 2026-08-19 15:51:53 +02:00
DXL 0191fb78ec CMake has been implemented to manage ARM projects.
Add the mkversion bat and ps1 implementation to the Windows platform compilation.
Make armlib a static library so that bootrom and armsrc can be reused.
2026-08-19 15:51:50 +02:00
DXL 355d58b1cb armlib includes 2026-08-19 15:51:18 +02:00
dxl 1cdd70d8e7 Export I2C_BufferReadRaw() of i2c.c 2026-08-19 15:51:18 +02:00
dxl 566ada5f33 The source files for the unit tests of Proxmark5 have been added. 2026-08-19 15:51:18 +02:00
dxl 3cc2f7e59b Make ldscript cross-platform. 2026-08-19 15:51:18 +02:00
dxl d59e96e09e Make proxmark3_arm.h more cross-platform. 2026-08-19 15:51:18 +02:00
dxl cbc56f720d Abstract the flash.c to avoid hard coding that makes it impossible to cross platforms. 2026-08-19 15:51:18 +02:00
DXL b448d3c6bd The bootrom performs hardware abstraction. 2026-08-19 15:48:58 +02:00
dxl 68aeb51482 hitag_common is restored to the FPGA-side detection edge and implemented using HAL. 2026-08-19 15:32:39 +02:00
dxl e3511c5350 Used HAL layer
in appmain.c and cmd added.
in cmd.c and add some code for test CEP
in em4x50.c(Do not timeout--)
in em4x70.c
in emvsim.c
in epa.c
in felica.c
in felicasim.c
in felicasim.c
in hfops.c
in hfsnoop.c
in hitag2.c
in hitag_common.c(Cross-platform implementation is incomplete.)
in hitagS.c
in hitagu.c
in i2c.c(Incomplete, continue to abstract.)
in i2c_direct.c
in iclass.c
in iso14443a.c(Sniff no finish yet)
in iso14443b.c and fixed bug for st25
in iso15693.c
in legicrf.c
in legicrfsim.c
in lfadc.c(lf_count_edge_periods_ex() improved)
in lfops.c(TI tag no finish yet)
in lfsampling.c
in lfzx.c
in mifarecmd.c
in mifaredesfire.c
in mifaresim.c
in mifaresniff_disabled.c
in mifareutil.c
in pcf7931.c
in sam_xxx
in secc & seos
in start.c
in thinfilm.c
in utils
2026-08-19 15:32:39 +02:00
dxl e4fa411ae9 Run ConfigSystemClocks() & UnitTestMain() in start.c 2026-08-19 15:32:39 +02:00
Philippe Teuwen ee4ff741ff Fix tools/mkversion.sh to follow new common_arm dir structure 2026-08-19 15:32:39 +02:00
dxl 36f1c7e44c Make common_arm to hardware abstraction layer. 2026-08-19 15:32:39 +02:00
Philippe Teuwen 51d0ff260a cppcheck fix sanity check condition in SimTagIso15693 2026-08-19 13:53:09 +02:00
Chloé Franke 070bdf78a1 Fixed hardcoded length of debug print of authentication nonce for mifare desfire 2026-08-19 13:20:52 +02:00
Cole Munz 0b40585124 Set the stringop-overflow flags before add_subdirectory(deps)
With the linker pin in place the proxspace job gets past the bootrom and
dies later instead, in the cmake build:

  client/deps/jansson/load.c:193:35: error: writing 1 byte into a region
  of size 0 [-Werror=stringop-overflow=]

client/CMakeLists.txt already turns that false positive off for GCC 10
and newer, but it does it at line 876 while add_subdirectory(deps) runs
at line 295. CMake copies the calling scope into a subdirectory at the
add_subdirectory call, so anything set afterwards never reaches the
bundled deps, and jansson is built without the suppression that the rest
of the client gets.

Move the block above the add_subdirectory call in both client and
experimental_lib. Checked by configuring before and after: 0 of 17 deps
targets carried -Wno-error=stringop-overflow in their flags.make before,
17 of 17 after.

ubuntu-cmake and macos-cmake stay green either way; their compilers do
not emit this particular false positive, which is why the gap went
unnoticed while the bootrom link was failing first.

Signed-off-by: Cole Munz <Munzzyy1@proton.me>
2026-08-19 13:18:46 +02:00
Philippe Teuwen ddd8e57427 Make loclass/cipher_bs_avx* compatible with clang 2026-08-19 12:59:29 +02:00
Philippe Teuwen 430fea5338 Guard fpga config flash mode with capability 2026-08-19 12:04:33 +02:00
Philippe Teuwen 7c436d2d58 guard pm5 commands with capabilities 2026-08-19 12:04:33 +02:00
Philippe Teuwen d2a8cca233 Add pm5 capabilities 2026-08-19 12:04:33 +02:00
Philippe Teuwen 420e36968b cmdfpga: clear error msg 2026-08-19 12:04:33 +02:00
dxl 40ec760a92 Strictly check the length of atqa. 2026-08-19 12:04:33 +02:00
dxl eaf9388b0e Git does not manage project folders in IntelliJ IDEA. 2026-08-19 12:04:33 +02:00
dxl 94e350fab9 Fixed a bug where Proxmark5 dump mfu data was empty. 2026-08-19 12:04:33 +02:00
dxl defa6ca212 Fixed a bug that caused a stringop-overflow warning when compiling load.c. 2026-08-19 12:04:33 +02:00
Philippe Teuwen 66c5fd8343 Fix external flash sanity check in prevision of pm5 2026-08-19 12:04:33 +02:00
dxl 389e052ba4 Add the relevant IO definitions for capturing ssc_frames on PM5. 2026-08-19 12:04:33 +02:00