Commit graph

76 commits

Author SHA1 Message Date
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
Philippe Teuwen bf3ae7f007 perform startup delay also during TIA 2019-10-15 18:07:28 +02:00
Philippe Teuwen 3fce47d023 Add hw tia to trigger a new Timing Interval Acquisition 2019-10-15 15:02:34 +02:00
Philippe Teuwen 3560cf5466 bootrom: remove deprecated CMD_SETUP_WRITE 2019-10-05 19:10:40 +02:00
Philippe Teuwen 9370649861 bootrom: avoid pointer magic to please coverity 2019-10-05 19:10:40 +02:00
Philippe Teuwen d19754567d summer restructuring:
* .h include only the strict minimum for their own parsing
  * this forces all files to include explicitment their needs and not count on far streched dependencies
  * this helps Makefile to rebuild only the minimum
  * according to this rule, most standalone .h are now gone
  * big app.h is gone
  * remove seldom __cplusplus, if c++ happens, everything will have to be done properly anyway
* all unrequired include were removed
* split common/ into common/ (client+arm) and common_arm/ (os+bootloader)
  * bring zlib to common/
  * bring stuff not really/not yet used in common back to armsrc/ or client/
  * bring liblua into client/
  * bring uart into client/
  * move some portions of code around (dbprint, protocols,...)
* rename unused files into *_disabled.[ch] to make it explicit
* rename soft Uarts between 14a, 14b and iclass, so a standalone could use several without clash
* remove PrintAndLogDevice
* move deprecated-hid-flasher from client to tools
* Makefiles
  * treat deps in armsrc/ as in client/
  * client: stop on warning (-Werror), same as for armsrc/

Tested on:

* all standalone modes
* Linux
2019-08-11 21:42:01 +02:00
Philippe Teuwen 1354aec556 typos 2019-08-06 13:51:10 +02:00
Philippe Teuwen daae890667 Bootrom & flasher changes:
* use macros for versions
* activate UNDERSTANDS_VERSION in bootrom
* fix missing break; bug in bootrom
* force flash_load to reject images > 256k if bootloader not up to date
* move logic from flasher to flash
2019-07-20 10:48:40 +02:00
slurdge 68aa9d631d Flasher support for versionning
Only bootrom with version > 1.0.0 will allow 512K writes
2019-07-20 10:47:24 +02:00
slurdge c056e56492 Add a version command to the bootloader (not activated yet) 2019-07-20 10:47:24 +02:00
Philippe Teuwen 8e6258936c make style 2019-07-19 13:18:35 +02:00
slurdge 7bf3255a6c Flasher support for 512K flash
A better way would be to cut the connecting function and flashing function and to move the whole mem computation to flash.c
Working flasher
2019-07-19 12:35:04 +02:00
Philippe Teuwen b0dbbd3683 make style 2019-07-13 00:38:30 +02:00
slurdge 4727ab96d7 Dynamic report of the chipID for flashing purposes 2019-07-10 21:11:20 +02:00
Philippe Teuwen a55e597e36 make style 2019-06-07 21:40:33 +02:00
Philippe Teuwen 732bc766f9 Reduce some var scopes 2019-06-07 18:41:39 +02:00
Philippe Teuwen 51e4df533e New button behaviour in bootloader mode:
- Keep button pressed when powering to force entering bootloader
  - Once in bootloader more, you can release the button
- When in bootloader mode (no matter how you entered that mode)
  - One button press to quit bootloader mode and boot main image
2019-05-26 17:48:30 +02:00
Philippe Teuwen 27f7057961 Rename few USB -> PM3 to avoid misleading interpretations 2019-04-30 21:10:11 +02:00
Philippe Teuwen 7d2d23ce50 fix bootrom using new names (but still old packets) 2019-04-25 01:53:09 +02:00
Philippe Teuwen 482db05741 Rename few stuff for consistency 2019-04-18 12:49:51 +02:00
Philippe Teuwen 4e31c6110b Better Command structs 2019-04-18 00:12:52 +02:00
Philippe Teuwen be15ad7fec Viva la revolucion 2019-04-17 21:30:01 +02:00
iceman1001 ce5fcf1e2d simplify 2019-04-07 12:20:17 +02:00
iceman1001 ca9061bd32 changed byte_t -> uint8_t 2019-03-21 15:19:18 +01:00
Philippe Teuwen 961d929f4d changing {} style to match majority of previous style 2019-03-10 11:20:22 +01:00
Philippe Teuwen 0373696662 make style 2019-03-10 00:00:59 +01:00
Philippe Teuwen 248a861613 bootrom: fix mix of spaces & tabs 2019-03-09 10:42:03 +01:00
Philippe Teuwen 60f292b18e remove spurious spaces & tabs at end of lines 2019-03-09 08:59:13 +01:00
Chris 24eaac8681 CHG: the thread comms refactoring from offical pm3 repo
chg: FPC com speed limited to 115200 when compiled with FPC
chg: USART remake (@drandreas)
2018-09-06 21:43:20 +02:00
Chris 49735b62f1 syntax sugar 2018-07-04 12:20:08 +02:00
Chris 35b7989b1c chg: OR in values. 2018-07-02 18:54:12 +02:00
iceman1001 b0545ed555 chg: re-arranged 2017-10-20 14:49:36 +02:00
iceman1001 3b665be5fc chg: usb_cdc, it should be similar to official pm3. lets 2017-10-19 13:06:47 +02:00
iceman1001 1f0a1edfbe CHG: restored the wait in flash-mode. Its waiting for the device to "reboot"..
CHG: usb_Cdc,   :  usb specs say 100ms delay. Previous delay was much longer...
2017-10-17 23:09:32 +02:00
iceman1001 dc7473135c syntax cleaning 2017-10-17 22:05:52 +02:00
iceman1001 d46955e309 FIX: bootrom - flashmode should also not assume sizeof(usbcommand) 544 bytes 2017-10-17 21:14:36 +02:00
iceman1001 16028f7d33 CHG: appmain now calls cmd_recieve as it should
CHG: flasher -  removed unneeded parameter to function
CHG: flasher - increased limit to fpga-files that can be loaded
FIX: main client,  wrong windows define fixed.
CHG: device side - recieve usb command does not always get 544 bytes.  usb packages can be incomplete.
CHG: usb_cdc.c also got piwi's changes.
CHG: uart_posix.c removed a debug value
CHG: uart_win32.c clean up.
2017-10-17 20:58:17 +02:00
iceman1001 77103e71cf CHG: bootrom flashmode, the delay wait, is already inside usb_enable() function. 2017-10-13 10:40:26 +02:00
iceman1001 e886490a2d CHG: from normal poll, to the length validating one. 2017-10-10 14:04:20 +02:00
iceman1001 07fffb4645 CHG: bootrom configuration to highest clock PLL 2017-09-26 17:04:53 +02:00
iceman1001 0f7241f4b3 FIX: found old thread on forum from 2010, saying this bitshifts are wrong.
ref:   http://www.proxmark.org/forum/viewtopic.php?id=643
2017-09-26 00:19:54 +02:00
iceman1001 1c3ffe1ce2 syntax sugar 2017-09-20 10:42:03 +02:00
iceman1001 6598e12752 FIX: good solution for enabling 512kb memory, instead of a #define. It reads the chipId and detects memsize based on it. 2017-08-22 11:55:00 +02:00
iceman1001 4406f4ee2a CHG: removed some #DEFINE TRUE/FALSE 2017-07-07 12:52:51 +02:00
iceman1001 07bc72b880 CHG: continue code cleanup.
REM: removed stdint.h ,  since we are using c99 when compiling.
2017-02-23 00:32:14 +01:00