printf() warning fixes due to uint32_t change-over
git-svn-id: svn://svn.berlios.de/openocd/trunk@2293 b42882b7-edfa-0310-969c-e2dbd0fdcd60
This commit is contained in:
parent
9eb3181cc8
commit
40d7e81c45
|
@ -472,13 +472,13 @@ static int armjtagew_get_status(void)
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
{
|
{
|
||||||
unsigned int u_tg = buf_get_u32(usb_in_buffer, 0, 16);
|
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", \
|
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), \
|
(int)(buf_get_u32(usb_in_buffer + 0, 0, 16)),
|
||||||
buf_get_u32(usb_in_buffer + 2, 0, 16), \
|
(int)(buf_get_u32(usb_in_buffer + 2, 0, 16)),
|
||||||
buf_get_u32(usb_in_buffer + 4, 0, 16), \
|
(int)(buf_get_u32(usb_in_buffer + 4, 0, 16)),
|
||||||
buf_get_u32(usb_in_buffer + 6, 0, 16), \
|
(int)(buf_get_u32(usb_in_buffer + 6, 0, 16)),
|
||||||
usb_in_buffer[9], \
|
usb_in_buffer[9],
|
||||||
usb_in_buffer[11] ? "OVERCURRENT" : "OK", \
|
usb_in_buffer[11] ? "OVERCURRENT" : "OK",
|
||||||
usb_in_buffer[10] ? "enabled" : "disabled");
|
usb_in_buffer[10] ? "enabled" : "disabled");
|
||||||
|
|
||||||
if (u_tg < 1500)
|
if (u_tg < 1500)
|
||||||
|
|
|
@ -864,8 +864,11 @@ static void jtag_examine_chain_display(enum log_levels level, const char *msg,
|
||||||
log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
|
log_printf_lf(level, __FILE__, __LINE__, __FUNCTION__,
|
||||||
"JTAG tap: %s %16.16s: 0x%08x "
|
"JTAG tap: %s %16.16s: 0x%08x "
|
||||||
"(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
|
"(mfg: 0x%3.3x, part: 0x%4.4x, ver: 0x%1.1x)",
|
||||||
name, msg, idcode,
|
name, msg,
|
||||||
EXTRACT_MFG(idcode), EXTRACT_PART(idcode), EXTRACT_VER(idcode) );
|
(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)
|
static bool jtag_idcode_is_final(uint32_t idcode)
|
||||||
|
@ -889,7 +892,7 @@ static void jtag_examine_chain_end(uint8_t *idcodes, unsigned count, unsigned ma
|
||||||
if (!triggered && jtag_idcode_is_final(idcode))
|
if (!triggered && jtag_idcode_is_final(idcode))
|
||||||
continue;
|
continue;
|
||||||
LOG_WARNING("Unexpected idcode after end of chain: %d 0x%08x",
|
LOG_WARNING("Unexpected idcode after end of chain: %d 0x%08x",
|
||||||
count, idcode);
|
count, (unsigned int)idcode);
|
||||||
triggered = true;
|
triggered = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1100,7 +1103,7 @@ void jtag_tap_init(jtag_tap_t *tap)
|
||||||
LOG_DEBUG("Created Tap: %s @ abs position %d, "
|
LOG_DEBUG("Created Tap: %s @ abs position %d, "
|
||||||
"irlen %d, capture: 0x%x mask: 0x%x", tap->dotted_name,
|
"irlen %d, capture: 0x%x mask: 0x%x", tap->dotted_name,
|
||||||
tap->abs_chain_position, tap->ir_length,
|
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);
|
jtag_tap_add(tap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -411,7 +411,9 @@ static int ft2232_read(uint8_t* buf, uint32_t size, uint32_t* bytes_read)
|
||||||
|
|
||||||
if (*bytes_read < size)
|
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;
|
return ERROR_JTAG_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -963,7 +965,8 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
|
||||||
LOG_ERROR("couldn't write MPSSE commands to FT2232");
|
LOG_ERROR("couldn't write MPSSE commands to FT2232");
|
||||||
exit(-1);
|
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;
|
ft2232_buffer_size = 0;
|
||||||
|
|
||||||
/* add command for complete bytes */
|
/* add command for complete bytes */
|
||||||
|
@ -1016,7 +1019,9 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
|
||||||
LOG_ERROR("couldn't write MPSSE commands to FT2232");
|
LOG_ERROR("couldn't write MPSSE commands to FT2232");
|
||||||
exit(-1);
|
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;
|
ft2232_buffer_size = 0;
|
||||||
|
|
||||||
if (type != SCAN_OUT)
|
if (type != SCAN_OUT)
|
||||||
|
@ -1026,7 +1031,9 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
|
||||||
LOG_ERROR("couldn't read from FT2232");
|
LOG_ERROR("couldn't read from FT2232");
|
||||||
exit(-1);
|
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;
|
receive_pointer += bytes_read;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1122,7 +1129,9 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
|
||||||
LOG_ERROR("couldn't write MPSSE commands to FT2232");
|
LOG_ERROR("couldn't write MPSSE commands to FT2232");
|
||||||
exit(-1);
|
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;
|
ft2232_buffer_size = 0;
|
||||||
|
|
||||||
if (type != SCAN_OUT)
|
if (type != SCAN_OUT)
|
||||||
|
@ -1132,7 +1141,9 @@ static int ft2232_large_scan(scan_command_t* cmd, enum scan_type type, uint8_t*
|
||||||
LOG_ERROR("couldn't read from FT2232");
|
LOG_ERROR("couldn't read from FT2232");
|
||||||
exit(-1);
|
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;
|
receive_pointer += bytes_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,7 @@ static int jlink_get_version_info(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
jlink_caps = buf_get_u32(usb_in_buffer, 0, 32);
|
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 (jlink_caps & (1 << EMU_CAP_GET_HW_VERSION))
|
||||||
{
|
{
|
||||||
|
@ -608,7 +608,7 @@ static int jlink_get_version_info(void)
|
||||||
if (major_revision >= 5)
|
if (major_revision >= 5)
|
||||||
jlink_hw_jtag_version = 3;
|
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))
|
if (jlink_caps & (1 << EMU_CAP_GET_MAX_BLOCK_SIZE))
|
||||||
|
@ -624,7 +624,7 @@ static int jlink_get_version_info(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
jlink_max_size = buf_get_u32(usb_in_buffer, 0, 32);
|
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;
|
return ERROR_OK;
|
||||||
|
|
|
@ -150,7 +150,8 @@ static int presto_write(uint8_t *buf, uint32_t size)
|
||||||
|
|
||||||
if (ftbytes != size)
|
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;
|
return ERROR_JTAG_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,7 +193,8 @@ static int presto_read(uint8_t* buf, uint32_t size)
|
||||||
if (ftbytes != size)
|
if (ftbytes != size)
|
||||||
{
|
{
|
||||||
/* this is just a warning, there might have been timeout when detecting PRESTO, which is not fatal */
|
/* 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;
|
return ERROR_JTAG_DEVICE_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -872,16 +872,16 @@ static int handle_scan_chain_command(struct command_context_s *cmd_ctx, char *cm
|
||||||
tap->abs_chain_position,
|
tap->abs_chain_position,
|
||||||
tap->dotted_name,
|
tap->dotted_name,
|
||||||
tap->enabled ? 'Y' : 'n',
|
tap->enabled ? 'Y' : 'n',
|
||||||
tap->idcode,
|
(unsigned int)(tap->idcode),
|
||||||
(tap->expected_ids_cnt > 0 ? tap->expected_ids[0] : 0),
|
(unsigned int)(tap->expected_ids_cnt > 0 ? tap->expected_ids[0] : 0),
|
||||||
tap->ir_length,
|
(unsigned int)(tap->ir_length),
|
||||||
expected,
|
(unsigned int)(expected),
|
||||||
expected_mask,
|
(unsigned int)(expected_mask),
|
||||||
cur_instr);
|
(unsigned int)(cur_instr));
|
||||||
|
|
||||||
for (ii = 1; ii < tap->expected_ids_cnt; ii++) {
|
for (ii = 1; ii < tap->expected_ids_cnt; ii++) {
|
||||||
command_print(cmd_ctx, " | | | | 0x%08x | | | | ",
|
command_print(cmd_ctx, " | | | | 0x%08x | | | | ",
|
||||||
tap->expected_ids[ii]);
|
(unsigned int)(tap->expected_ids[ii]));
|
||||||
}
|
}
|
||||||
|
|
||||||
tap = tap->next_tap;
|
tap = tap->next_tap;
|
||||||
|
@ -1503,3 +1503,9 @@ static int handle_tms_sequence_command(struct command_context_s *cmd_ctx, char *
|
||||||
return ERROR_OK;
|
return ERROR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Local Variables:
|
||||||
|
* c-basic-offset: 4
|
||||||
|
* tab-width: 4
|
||||||
|
* End:
|
||||||
|
*/
|
||||||
|
|
Loading…
Reference in New Issue