stlink_usb.c: Decode some more errors.
Change-Id: I637cb63bd39120554aa184eaa48fd00a4852359f Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de> Reviewed-on: http://openocd.zylin.com/2706 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
parent
03b72c367c
commit
4ed3a1efa2
|
@ -135,6 +135,8 @@ struct stlink_usb_handle_s {
|
|||
#define STLINK_DEBUG_ERR_OK 0x80
|
||||
#define STLINK_DEBUG_ERR_FAULT 0x81
|
||||
#define STLINK_SWD_AP_WAIT 0x10
|
||||
#define STLINK_JTAG_WRITE_ERROR 0x0c
|
||||
#define STLINK_JTAG_WRITE_VERIF_ERROR 0x0d
|
||||
#define STLINK_SWD_DP_WAIT 0x14
|
||||
|
||||
#define STLINK_CORE_RUNNING 0x80
|
||||
|
@ -390,6 +392,12 @@ static int stlink_usb_error_check(void *handle)
|
|||
case STLINK_SWD_DP_WAIT:
|
||||
LOG_DEBUG("wait status SWD_DP_WAIT (0x%x)", STLINK_SWD_AP_WAIT);
|
||||
return ERROR_WAIT;
|
||||
case STLINK_JTAG_WRITE_ERROR:
|
||||
LOG_DEBUG("Write error");
|
||||
return ERROR_FAIL;
|
||||
case STLINK_JTAG_WRITE_VERIF_ERROR:
|
||||
LOG_DEBUG("Verify error");
|
||||
return ERROR_FAIL;
|
||||
default:
|
||||
LOG_DEBUG("unknown/unexpected STLINK status code 0x%x", h->databuf[0]);
|
||||
return ERROR_FAIL;
|
||||
|
|
Loading…
Reference in New Issue