Helpful for sanity checking connections
Change-Id: Ife0d8b4e12d4c03685aac8115c9739a4c1e994fe
Signed-off-by: Karl Palsson <karlp@tweak.net.au>
Reviewed-on: http://openocd.zylin.com/3405
Tested-by: jenkins
Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
cmsis_dap_swd_queue_cmd(cmd, value, 0);
}
+static int cmsis_dap_get_serial_info(void)
+{
+ uint8_t *data;
+
+ int retval = cmsis_dap_cmd_DAP_Info(INFO_ID_SERNUM, &data);
+ if (retval != ERROR_OK)
+ return retval;
+
+ if (data[0]) /* strlen */
+ LOG_INFO("CMSIS-DAP: Serial# = %s", &data[1]);
+
+ return ERROR_OK;
+}
+
static int cmsis_dap_get_version_info(void)
{
uint8_t *data;
if (retval != ERROR_OK)
return retval;
+ retval = cmsis_dap_get_serial_info();
+ if (retval != ERROR_OK)
+ return retval;
+
if (swd_mode) {
retval = cmsis_dap_swd_open();
if (retval != ERROR_OK)