From: OpenOCD-Gerrit <ope...@us...> - 2020-04-12 21:07:22
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via b9a30e089227db441afd300989b0befce21b7da3 (commit) via 68e200c660aefe960e351452748f299c4a334474 (commit) from 263296e549455afa1484cf9dec75fc3014a83954 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b9a30e089227db441afd300989b0befce21b7da3 Author: Ake Rehnman <ake...@gm...> Date: Sun Mar 29 12:13:18 2020 +0200 Entering SWIM mode on ST-LINK does not update swim status word. As a consequence of a previous failed SWIM command any subsequent attempts to enter SWIM mode fails. Change stlink_usb_mode_enter to use stlink_usb_xfer_noerrcheck instead. Change-Id: I5c6a1a8e68d3dc77ec37264880383366fa6a75d9 Signed-off-by: Ake Rehnman <ake...@gm...> Reviewed-on: http://openocd.zylin.com/5547 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index 45bb5019f..a905576c8 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -1230,9 +1230,8 @@ static int stlink_usb_mode_enter(void *handle, enum stlink_mode type) case STLINK_MODE_DEBUG_SWIM: h->cmdbuf[h->cmdidx++] = STLINK_SWIM_COMMAND; h->cmdbuf[h->cmdidx++] = STLINK_SWIM_ENTER; - /* no answer for this function... */ - rx_size = 0; - break; + /* swim enter does not return any response or status */ + return stlink_usb_xfer_noerrcheck(handle, h->databuf, 0); case STLINK_MODE_DFU: case STLINK_MODE_MASS: default: commit 68e200c660aefe960e351452748f299c4a334474 Author: Tarek BOCHKATI <tar...@gm...> Date: Mon Mar 30 13:06:18 2020 +0200 stlink: always use a valid endpoint In order to extend the driver to support stlink-server over TCP, we should always use a valid endpoint, as stlink-server is not permissive and do not accept the invalid STLINK_NULL_EP. STLINK_NULL_EP value was used for commands without an expected reply, this value could be replaced with a valid endpoint without any impact when the size is set to zero. Change-Id: I003ad364e03d3a10bc036772db86310d996cbe81 Signed-off-by: Tarek BOCHKATI <tar...@gm...> Reviewed-on: http://openocd.zylin.com/5455 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/jtag/drivers/stlink_usb.c b/src/jtag/drivers/stlink_usb.c index f4992daa6..45bb5019f 100644 --- a/src/jtag/drivers/stlink_usb.c +++ b/src/jtag/drivers/stlink_usb.c @@ -55,7 +55,6 @@ #define STLINK_WRITE_TIMEOUT 1000 #define STLINK_READ_TIMEOUT 1000 -#define STLINK_NULL_EP 0 #define STLINK_RX_EP (1|ENDPOINT_IN) #define STLINK_TX_EP (2|ENDPOINT_OUT) #define STLINK_TRACE_EP (3|ENDPOINT_IN) @@ -1251,7 +1250,8 @@ static int stlink_usb_mode_leave(void *handle, enum stlink_mode type) assert(handle != NULL); - stlink_usb_init_buffer(handle, STLINK_NULL_EP, 0); + /* command with no reply, use a valid endpoint but zero size */ + stlink_usb_init_buffer(handle, h->rx_ep, 0); switch (type) { case STLINK_MODE_DEBUG_JTAG: @@ -1272,7 +1272,7 @@ static int stlink_usb_mode_leave(void *handle, enum stlink_mode type) return ERROR_FAIL; } - res = stlink_usb_xfer_noerrcheck(handle, 0, 0); + res = stlink_usb_xfer_noerrcheck(handle, h->databuf, 0); if (res != ERROR_OK) return res; ----------------------------------------------------------------------- Summary of changes: src/jtag/drivers/stlink_usb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) hooks/post-receive -- Main OpenOCD repository |