diff options
author | Paul Fertser <fercerpav@gmail.com> | 2016-11-04 14:18:21 +0300 |
---|---|---|
committer | Paul Fertser <fercerpav@gmail.com> | 2016-12-08 12:30:52 +0000 |
commit | aa2c38d50cfc30b651b47cfe93dcc4238c887d68 (patch) | |
tree | c71316d0c778f04f9ba99bf7037e7655848132ae /src | |
parent | 063253fa89b2d48104b43783c03ff7161c5d1a5a (diff) | |
download | riscv-openocd-aa2c38d50cfc30b651b47cfe93dcc4238c887d68.zip riscv-openocd-aa2c38d50cfc30b651b47cfe93dcc4238c887d68.tar.gz riscv-openocd-aa2c38d50cfc30b651b47cfe93dcc4238c887d68.tar.bz2 |
jtag: drivers: cmsis-dap: fix operation with SAMD10 Xplained board
Change-Id: I9164edeb83c9a9106e74798e98b9517177e83358
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/3856
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src')
-rw-r--r-- | src/jtag/drivers/cmsis_dap_usb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jtag/drivers/cmsis_dap_usb.c b/src/jtag/drivers/cmsis_dap_usb.c index 7791840..dd37522 100644 --- a/src/jtag/drivers/cmsis_dap_usb.c +++ b/src/jtag/drivers/cmsis_dap_usb.c @@ -316,9 +316,11 @@ static int cmsis_dap_usb_open(void) int packet_size = PACKET_SIZE; /* atmel cmsis-dap uses 512 byte reports */ + /* except when it doesn't e.g. with mEDBG on SAMD10 Xplained + * board */ /* TODO: HID report descriptor should be parsed instead of * hardcoding a match by VID */ - if (target_vid == 0x03eb) + if (target_vid == 0x03eb && target_pid != 0x2145) packet_size = 512 + 1; cmsis_dap_handle->packet_buffer = malloc(packet_size); |