95 Commits
Author SHA1 Message Date
iceman1001 5ac1ae2e06 when in bootrom mode, the arg0 variable needed to be zeroed out before usage. We assign arg0 from a message before but we can discard that information in this particular case. Its quite odd to see the assignment failing but empty it out seems to have fixed it. 2024-10-16 09:36:37 +02:00
iceman1001 6abb217a18 fix shadowed variable 2024-05-14 10:10:12 +02:00
iceman1001 db616ce7bf style 2024-01-24 17:12:56 +01:00
Martijn Plak 6202da367f coding style 2024-01-24 17:05:37 +01:00
Martijn Plak 1d14bc38c5 Rename CMD_READ_MEM_DOWNLOAD flag.
It got included in pm3_cmd.lua but shouldn't be because it's not a command.
Also, the bitshift in the value upsets some versions of lua.
2024-01-24 16:36:52 +01:00
iceman1001 081ff216eb style 2024-01-23 15:28:50 +01:00
Martijn Plak ebdd30e92c readmem (ARM): boundary check against end of addressable space 2024-01-23 08:41:53 +01:00
Martijn Plak e35385fde1 Adding processor flash memory reading, viewing and writing to file.
Works when the device is running either osimage or bootloader.

- New memory reading command in osimage and bootloader.
- Extended 'hw readmem' command with length parameter, file writing and hex viewer.
- Introduced '--dumpmem' option to proxmark3 executable to support dumping from bootloader.

Simple interactive examples:
  hw readmem -f flashdump
  hw readmem -l 1024
CLI example:
  ./pm3 --dumpmem flashdump.bin

Reading from arbitrary memory ranges can be unlocked using the 'raw' option.
2024-01-22 16:40:05 +01:00
wh201906 00686a91d0 Ignore button jitters in bootloader mode 2024-01-03 15:39:50 +08:00
nvx d3a90a5da3 Clear bss on bootloader start.
This fixes a bug with the USB device serial number sometimes not working in bootloader mode.
2023-12-14 20:33:00 +10:00
iceman1001 e41019e584 the renumerations of USB seems to time critical. Prolonging the delay seems to improve it. Thanks to @NVX / @HenryGab for looking into it 2023-12-14 00:36:07 +01:00
Self Not FoundandGitHub d33fbf1347 Fix units 2023-04-06 20:54:00 +08:00
Henry Gabryjelski 48ca513a96 updates from make style 2023-02-17 17:27:07 -08:00
Henry Gabryjelski 44676bde72 Bootrom: Enable serial number from flash
* Add `.ramfunc` section to bootrom loader script
* exclude spiffs functionality from flashmem.h/flashmem.c
   (allows bootrom to use flashmem)
* hide unused tick.h / flashmem.h functions from bootrom
   (not technically necessary; see comments)
* bootrom: add source files, include path, and defines when
  `PLATFORM_DEFS` defines `WITH_FLASH`
* Define `AS_BOOTROM` to indicate code is building for bootrom
2023-02-17 17:07:13 -08:00
iceman1001 b98d518fd7 style 2022-01-06 19:41:45 +01:00
Philippe Teuwen b703bb746b Adapting license headers, WIP 2022-01-06 02:20:38 +01:00
merlokk d46d23d079 make style 2021-08-25 14:44:06 +03:00
Philippe Teuwen 0384359aa4 icopyx bootloader safeguard 2021-08-21 23:52:15 +02:00
Philippe Teuwen d56d8f0f65 rename common_area typedef and global 2021-08-21 23:29:56 +02:00
Philippe Teuwen a330401769 change strategy for refs to linker symbols to get compatible again with old GCC (6.3), tested on GCC 11 too 2021-05-25 16:47:13 +02:00
Philippe Teuwen a592b349cb make style 2021-05-18 23:56:11 +02:00
Philippe Teuwen 0f80c6dea4 Uniformize source code ref: bootloader
Using "extern char linker_symbol[]" notation
cf https://sourceware.org/binutils/docs/ld/Source-Code-Reference.html
2021-05-14 00:05:44 +02:00
iceman1001 9594619af3 fix cppchecker 2020-06-02 12:51:45 +02:00
Philippe Teuwen d7422aaf99 bootrom fix warnings 2020-05-11 13:48:57 +02:00
Philippe Teuwen f9463d183a bootloader: fix missing prototypes and shadowed vars 2020-05-11 13:48:57 +02:00