if (result == 0)
{
unsigned int u_tg = buf_get_u32(usb_in_buffer, 0, 16);
- LOG_INFO("U_tg = %d mV, U_aux = %d mV, U_tgpwr = %d mV, I_tgpwr = %d mA, D1 = %d, Target power %s %s\n", \
- buf_get_u32(usb_in_buffer + 0, 0, 16), \
- buf_get_u32(usb_in_buffer + 2, 0, 16), \
- buf_get_u32(usb_in_buffer + 4, 0, 16), \
- buf_get_u32(usb_in_buffer + 6, 0, 16), \
- usb_in_buffer[9], \
- usb_in_buffer[11] ? "OVERCURRENT" : "OK", \
- usb_in_buffer[10] ? "enabled" : "disabled");
+ LOG_INFO("U_tg = %d mV, U_aux = %d mV, U_tgpwr = %d mV, I_tgpwr = %d mA, D1 = %d, Target power %s %s\n",
+ (int)(buf_get_u32(usb_in_buffer + 0, 0, 16)),
+ (int)(buf_get_u32(usb_in_buffer + 2, 0, 16)),
+ (int)(buf_get_u32(usb_in_buffer + 4, 0, 16)),
+ (int)(buf_get_u32(usb_in_buffer + 6, 0, 16)),
+ usb_in_buffer[9],
+ usb_in_buffer[11] ? "OVERCURRENT" : "OK",
+ usb_in_buffer[10] ? "enabled" : "disabled");
if (u_tg < 1500)
{
const char *name, uint32_t idcode)
{
log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
- "JTAG tap: %s %16.16s: 0x%08x "
- "(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
- name, msg, idcode,
- EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
+ "JTAG tap: %s %16.16s: 0x%08x "
+ "(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
+ name, msg,
+ (unsigned int)idcode,
+ (unsigned int)EXTRACT_MFG(idcode),
+ (unsigned int)EXTRACT_PART(idcode),
+ (unsigned int)EXTRACT_VER(idcode) );
}
static bool jtag_idcode_is_final(uint32_t idcode)
if (!triggered && jtag_idcode_is_final(idcode))
continue;
LOG_WARNING("Unexpected idcode after end of chain: %d 0x%08x",
- count, idcode);
+ count, (unsigned int)idcode);
triggered = true;
}
}
LOG_DEBUG("Created Tap: %s @ abs position %d, "
"irlen %d, capture: 0x%x mask: 0x%x", tap->dotted_name,
tap->abs_chain_position, tap->ir_length,
- tap->ir_capture_value, tap->ir_capture_mask);
+ (unsigned int)(tap->ir_capture_value), (unsigned int)(tap->ir_capture_mask));
jtag_tap_add(tap);
}
if (*bytes_read < size)
{
- LOG_ERROR("couldn't read the requested number of bytes from FT2232 device (%i < %i)", *bytes_read, size);
+ LOG_ERROR("couldn't read the requested number of bytes from FT2232 device (%i < %i)",
+ (unsigned int)(*bytes_read),
+ (unsigned int)size);
return ERROR_JTAG_DEVICE_ERROR;
}
LOG_ERROR("couldn't write MPSSE commands to FT2232");
exit(-1);
}
- LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i", ft2232_buffer_size, bytes_written);
+ LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
+ ft2232_buffer_size, (int)bytes_written);
ft2232_buffer_size = 0;
/* add command for complete bytes */
LOG_ERROR("couldn't write MPSSE commands to FT2232");
exit(-1);
}
- LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i", ft2232_buffer_size, bytes_written);
+ LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
+ ft2232_buffer_size,
+ (int)bytes_written);
ft2232_buffer_size = 0;
if (type != SCAN_OUT)
LOG_ERROR("couldn't read from FT2232");
exit(-1);
}
- LOG_DEBUG("thisrun_read: %i, bytes_read: %i", thisrun_read, bytes_read);
+ LOG_DEBUG("thisrun_read: %i, bytes_read: %i",
+ thisrun_read,
+ (int)bytes_read);
receive_pointer += bytes_read;
}
}
LOG_ERROR("couldn't write MPSSE commands to FT2232");
exit(-1);
}
- LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i", ft2232_buffer_size, bytes_written);
+ LOG_DEBUG("ft2232_buffer_size: %i, bytes_written: %i",
+ ft2232_buffer_size,
+ (int)bytes_written);
ft2232_buffer_size = 0;
if (type != SCAN_OUT)
LOG_ERROR("couldn't read from FT2232");
exit(-1);
}
- LOG_DEBUG("thisrun_read: %i, bytes_read: %i", thisrun_read, bytes_read);
+ LOG_DEBUG("thisrun_read: %i, bytes_read: %i",
+ thisrun_read,
+ (int)bytes_read);
receive_pointer += bytes_read;
}
}
jlink_caps = buf_get_u32(usb_in_buffer, 0, 32);
- LOG_INFO("JLink caps 0x%x", jlink_caps);
+ LOG_INFO("JLink caps 0x%x", (unsigned)jlink_caps);
if (jlink_caps & (1 << EMU_CAP_GET_HW_VERSION))
{
if (major_revision >= 5)
jlink_hw_jtag_version = 3;
- LOG_INFO("JLink hw version %i", jlink_hw_version);
+ LOG_INFO("JLink hw version %i", (int)jlink_hw_version);
}
if (jlink_caps & (1 << EMU_CAP_GET_MAX_BLOCK_SIZE))
}
jlink_max_size = buf_get_u32(usb_in_buffer, 0, 32);
- LOG_INFO("JLink max mem block %i", jlink_max_size);
+ LOG_INFO("JLink max mem block %i", (int)jlink_max_size);
}
return ERROR_OK;
if (ftbytes != size)
{
- LOG_ERROR("couldn't write the requested number of bytes to PRESTO (%u < %u)", (uint32_t)ftbytes, size);
+ LOG_ERROR("couldn't write the requested number of bytes to PRESTO (%u < %u)",
+ (unsigned)ftbytes, (unsigned)size);
return ERROR_JTAG_DEVICE_ERROR;
}
if (ftbytes != size)
{
/* this is just a warning, there might have been timeout when detecting PRESTO, which is not fatal */
- LOG_WARNING("couldn't read the requested number of bytes from PRESTO (%u < %u)", (uint32_t)ftbytes, size);
+ LOG_WARNING("couldn't read the requested number of bytes from PRESTO (%u < %u)",
+ (unsigned)ftbytes, (unsigned)size);
return ERROR_JTAG_DEVICE_ERROR;
}
tap->abs_chain_position,
tap->dotted_name,
tap->enabled ? 'Y' : 'n',
- tap->idcode,
- (tap->expected_ids_cnt > 0 ? tap->expected_ids[0] : 0),
- tap->ir_length,
- expected,
- expected_mask,
- cur_instr);
+ (unsigned int)(tap->idcode),
+ (unsigned int)(tap->expected_ids_cnt > 0 ? tap->expected_ids[0] : 0),
+ (unsigned int)(tap->ir_length),
+ (unsigned int)(expected),
+ (unsigned int)(expected_mask),
+ (unsigned int)(cur_instr));
for (ii = 1; ii < tap->expected_ids_cnt; ii++) {
command_print(cmd_ctx, " | | | | 0x%08x | | | | ",
- tap->expected_ids[ii]);
+ (unsigned int)(tap->expected_ids[ii]));
}
tap = tap->next_tap;
return ERROR_OK;
}
+/*
+ * Local Variables:
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */