log: Add a new debug level (4) for verbose I/O debug
Change ftdi SWD driver and CMSIS-DAP to use it instead of LOG_DEBUG(). Change-Id: I17ba3de2086c7159209db61fba3faf067dfc5023 Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/3805 Tested-by: jenkins Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Spencer Oliver
parent
04b23ef502
commit
3ee81fd787
@@ -596,7 +596,7 @@ static int cmsis_dap_swd_run_queue(void)
|
||||
{
|
||||
uint8_t *buffer = cmsis_dap_handle->packet_buffer;
|
||||
|
||||
LOG_DEBUG("Executing %d queued transactions", pending_transfer_count);
|
||||
LOG_DEBUG_IO("Executing %d queued transactions", pending_transfer_count);
|
||||
|
||||
if (queued_retval != ERROR_OK) {
|
||||
LOG_DEBUG("Skipping due to previous errors: %d", queued_retval);
|
||||
@@ -616,7 +616,7 @@ static int cmsis_dap_swd_run_queue(void)
|
||||
uint8_t cmd = pending_transfers[i].cmd;
|
||||
uint32_t data = pending_transfers[i].data;
|
||||
|
||||
LOG_DEBUG("%s %s reg %x %"PRIx32,
|
||||
LOG_DEBUG_IO("%s %s reg %x %"PRIx32,
|
||||
cmd & SWD_CMD_APnDP ? "AP" : "DP",
|
||||
cmd & SWD_CMD_RnW ? "read" : "write",
|
||||
(cmd & SWD_CMD_A32) >> 1, data);
|
||||
@@ -674,7 +674,7 @@ static int cmsis_dap_swd_run_queue(void)
|
||||
uint32_t tmp = data;
|
||||
idx += 4;
|
||||
|
||||
LOG_DEBUG("Read result: %"PRIx32, data);
|
||||
LOG_DEBUG_IO("Read result: %"PRIx32, data);
|
||||
|
||||
/* Imitate posted AP reads */
|
||||
if ((pending_transfers[i].cmd & SWD_CMD_APnDP) ||
|
||||
|
||||
@@ -1074,12 +1074,12 @@ static void ftdi_swd_swdio_en(bool enable)
|
||||
*/
|
||||
static int ftdi_swd_run_queue(void)
|
||||
{
|
||||
LOG_DEBUG("Executing %zu queued transactions", swd_cmd_queue_length);
|
||||
LOG_DEBUG_IO("Executing %zu queued transactions", swd_cmd_queue_length);
|
||||
int retval;
|
||||
struct signal *led = find_signal_by_name("LED");
|
||||
|
||||
if (queued_retval != ERROR_OK) {
|
||||
LOG_DEBUG("Skipping due to previous errors: %d", queued_retval);
|
||||
LOG_DEBUG_IO("Skipping due to previous errors: %d", queued_retval);
|
||||
goto skip;
|
||||
}
|
||||
|
||||
@@ -1100,7 +1100,7 @@ static int ftdi_swd_run_queue(void)
|
||||
for (size_t i = 0; i < swd_cmd_queue_length; i++) {
|
||||
int ack = buf_get_u32(swd_cmd_queue[i].trn_ack_data_parity_trn, 1, 3);
|
||||
|
||||
LOG_DEBUG("%s %s %s reg %X = %08"PRIx32,
|
||||
LOG_DEBUG_IO("%s %s %s reg %X = %08"PRIx32,
|
||||
ack == SWD_ACK_OK ? "OK" : ack == SWD_ACK_WAIT ? "WAIT" : ack == SWD_ACK_FAULT ? "FAULT" : "JUNK",
|
||||
swd_cmd_queue[i].cmd & SWD_CMD_APnDP ? "AP" : "DP",
|
||||
swd_cmd_queue[i].cmd & SWD_CMD_RnW ? "read" : "write",
|
||||
|
||||
Reference in New Issue
Block a user