Commit graph

39 commits

Author SHA1 Message Date
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 8b3159c83d Use more defines when using main clock or master clock 2019-08-06 13:40:08 +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 d7614684f8 Make sure standalone modes can be launched when connected on USB without client 2019-06-02 23:20:02 +02:00
Philippe Teuwen b17da830ed Compute fp on the fly 2019-05-18 22:20:47 +02:00
iceman1001 ec796f4d81 chg: add fractional for 921600, 1382400 baudrate 2019-05-18 21:40:45 +02:00
iceman1001 d3d98282ac comments about Fractional parts in the baudrate generator 2019-05-18 17:57:30 +02:00
Philippe Teuwen e9eb764358 Fix MCK in usart, our MCK is 16*12/2/2 2019-05-16 20:12:00 +02:00
Philippe Teuwen 8401eb4e14 Add usart btfactory 2019-05-15 02:15:19 +02:00
Philippe Teuwen e453aff88c First adjustments for FPC BT link 2019-04-23 23:36:36 +02:00
Philippe Teuwen dda63f9556 usart_fill_rxfifo: fetch no more than available room in FIFO 2019-04-23 00:25:14 +02:00
Philippe Teuwen b0eef756c1 return PM3_SUCCESS on usart_writebuffer_sync, usb_write 2019-04-22 23:03:01 +02:00
Philippe Teuwen f29facd15a Harmonize usb_write & usart_writebuffer_sync return values 2019-04-22 02:28:58 +02:00
Philippe Teuwen cdd4177968 usart_writebuffer_sync simplified as we're always sending in blocking mode anyway 2019-04-22 00:30:01 +02:00
Philippe Teuwen 3dd1f1c78c make style (hmm not perfect, we'll have to live with it I guess) 2019-04-21 14:10:31 +02:00
Philippe Teuwen e0cd5850f9 usart: clean, doc, now uart_posix 60ms 2019-04-21 12:02:36 +02:00
Philippe Teuwen 6e744043f5 usart working... when debugged... 2019-04-21 00:44:19 +02:00
Philippe Teuwen a45238236d armsrc: put new frame parsing in common for usart (still usart_read_ng to do) 2019-04-20 01:47:50 +02:00
Philippe Teuwen 482db05741 Rename few stuff for consistency 2019-04-18 12:49:51 +02:00
Philippe Teuwen 533667ea6d Better Reply structs 2019-04-17 23:44:48 +02:00
Philippe Teuwen 3cba736841 baudrate for usart: use define and limit to 115200 only for WITH_FPC_HOST 2019-04-14 14:42:03 +02:00
Philippe Teuwen 85f67006e4 Remove redundant define 2019-04-14 14:35:42 +02:00
iceman1001 d28fac3ef0 style 2019-04-14 11:43:05 +02:00
iceman1001 b50fe594da chg: moved include.. 2019-04-14 11:17:59 +02:00
iceman1001 fc0a62de18 Fix: USART - better RX/TX with one dma bank and wait loops (@ryan) 2019-04-14 11:08:44 +02:00
Philippe Teuwen 64ce30c06c make style 2019-04-02 22:32:45 +02:00
Philippe Teuwen 21be6d4400 FPC: got RX working, got client over usart somehow working..., see detailed commit msg
* using WITH_FPC:
  * activate basic usart
  * no double buffer for now, no interrupt
  * usart_dataavailable/usart_readbuffer/usart_writebuffer, to demo it:
    * pm3 client over USB, minicom over usart
    * analyse a d 414243
* using WITH_FPC_HOST:
  * it implies WITH_FPC as it's based on it
  * control pm3 with client over usart
  * EXPERIMENTAL! still some frame desync issues
  * you can connect both from usart & USB with two pm3 clients
    * actually you *have* to connect USB for the moment because
      it's used to send debug messages about buggy usart... See Dbprintf_usb below
  * "sessions": msgs are directed to the latest client to have sent a cmd
  * Dbprintf_usb macro to send msgs to USB client to help debugging usart...
  * We now have an option to run client at different speed as usart is 115200:
    client/proxmark3 /dev/ttyUSB0 -b 115200
  * Consequently, argc,argv handling is a bit revamped, it was so messy...
  * USB and flashing are still at 460800, don't try flashing over usart yet ^^
2019-04-02 22:06:10 +02:00
Philippe Teuwen dae6eefa52 FPC experiments: use oversampling, tested FPC at 460800 ^^ 2019-04-02 01:20:02 +02:00
Philippe Teuwen 7bd95dd5c3 FPC experiments: got so far TX_only, usart=115200 + usb=460800, see full commit msg
* Add \r\n to sent strings
* remove usart_init() from UsbPacketReceive cmd, it's already init in main.
* Add PLATFORM PM3RDV4FPC to ease dev
* TX: US_TCR is len of data to send, not len of buffer
* Use only one PDC bank as we're using it in sync
* Busy loop to wait for end of TX as we'using it in sync
* Change usart speed to 115200
* Don't downgrade USB speed, keep 460800
* Attempt to detect received data, fail so far
2019-04-02 01:06:03 +02:00
Philippe Teuwen 1b2601a48a Add missing EOF LF 2019-03-12 00:12:26 +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 23f1a253a7 common: fix mix of spaces & tabs 2019-03-09 19:19:50 +01:00
Philippe Teuwen 60f292b18e remove spurious spaces & tabs at end of lines 2019-03-09 08:59:13 +01:00
Chris f8c33af1da CHG: FPC connector tests. Device -> Client communications works.
Adjust  armsrc/Makefile   and client/Makefile  to include  the  -DWITH_FPC  flag to compile with FPC enabled.
2018-11-20 10:58:32 +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 5f77121694 initial commit to be in sync the-soon-defunct repo pm3rdv40. 2018-08-12 21:54:31 +02:00
Chris bacf8aff0f add: FPC connector skeleton usart. Not working but if will be a starting point for those who might want to help out with it. 2018-07-30 09:54:44 +02:00