assert(h->version.jtag >= STLINK_TRACE_MIN_VERSION);
- LOG_DEBUG("Tracing: disable\n");
+ LOG_DEBUG("Tracing: disable");
stlink_usb_init_buffer(handle, h->rx_ep, 2);
h->cmdbuf[h->cmdidx++] = STLINK_DEBUG_COMMAND;
res = stlink_configure_target_trace_port(handle);
if (res != ERROR_OK)
- LOG_ERROR("Unable to configure tracing on target\n");
+ LOG_ERROR("Unable to configure tracing on target");
trace_hz = h->trace.prescale > 0 ?
h->trace.source_hz / (h->trace.prescale + 1) :
if (res == ERROR_OK) {
h->trace.enabled = true;
- LOG_DEBUG("Tracing: recording at %" PRIu32 "Hz\n", trace_hz);
+ LOG_DEBUG("Tracing: recording at %" PRIu32 "Hz", trace_hz);
/* We need the trace read function to be called at a
* high-enough frequency to ensure reasonable
* "timeliness" in processing ITM/DWT data.
/* Try to start tracing, if requested */
if (res == ERROR_OK && h->trace.source_hz && !h->trace.enabled) {
if (stlink_usb_trace_enable(handle) == ERROR_OK)
- LOG_DEBUG("Tracing: enabled\n");
+ LOG_DEBUG("Tracing: enabled");
else
- LOG_ERROR("Tracing: enable failed\n");
+ LOG_ERROR("Tracing: enable failed");
}
return res;
const uint16_t vids[] = { param->vid, 0 };
const uint16_t pids[] = { param->pid, 0 };
+ const char *serial = param->serial;
- LOG_DEBUG("transport: %d vid: 0x%04x pid: 0x%04x", param->transport,
- param->vid, param->pid);
+ LOG_DEBUG("transport: %d vid: 0x%04x pid: 0x%04x serial: %s",
+ param->transport, param->vid, param->pid,
+ param->serial ? param->serial : "");
/*
On certain host USB configurations(e.g. MacBook Air)
in order to become operational.
*/
do {
- if (jtag_libusb_open(vids, pids, &h->fd) != ERROR_OK) {
+ if (jtag_libusb_open(vids, pids, serial, &h->fd) != ERROR_OK) {
LOG_ERROR("open failed");
goto error_open;
}