|
|
@@ -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; |
|
|
|