cmsis-dap: add initial cmsis-dap support
This is based on work from: https://github.com/TheShed/OpenOCD-CMSIS-DAP/tree/cmsis-dap Main changes include moving over to using HIDAPI rather than libusb-1.0 and cleaning up to merge into master. Support for reset using srst has also been added. It has been tested on all the mbed boards as well as the Freedom board from Freescale. These boards only implement SWD mode, however JTAG mode has been tested with a Keil ULINK2 and a stm32 target - but requires a lot more work. Change-Id: I96d5ee1993bc9c0526219ab754c5aad3b55d812d Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk> Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com> Reviewed-on: http://openocd.zylin.com/1542 Tested-by: jenkins
This commit is contained in:
@@ -110,11 +110,17 @@ struct swd_driver {
|
||||
*/
|
||||
int (*write_reg)(uint8_t cmd, uint32_t value);
|
||||
|
||||
/* XXX START WITH enough to:
|
||||
* init (synch mode, WCR)
|
||||
* for async, TRN > 1
|
||||
* read IDCODE from DP
|
||||
*/
|
||||
/**
|
||||
* Synchronous block read of an AP or DP register.
|
||||
*
|
||||
* @param cmd with APnDP/RnW/addr/parity bits
|
||||
* @param number of reads from register to be executed
|
||||
* @param buffer to store data read from register
|
||||
*
|
||||
* @return SWD_ACK_* code for the transaction
|
||||
* or (negative) fault code
|
||||
*/
|
||||
int (*read_block)(uint8_t cmd, uint32_t blocksize, uint8_t *buffer);
|
||||
|
||||
/**
|
||||
* Configures data collection from the Single-wire
|
||||
@@ -135,5 +141,6 @@ int swd_init_reset(struct command_context *cmd_ctx);
|
||||
void swd_add_reset(int req_srst);
|
||||
|
||||
bool transport_is_swd(void);
|
||||
bool transport_is_cmsis_dap(void);
|
||||
|
||||
#endif /* SWD_H */
|
||||
|
||||
Reference in New Issue
Block a user