diff options
author | Antonio Borneo <borneo.antonio@gmail.com> | 2020-08-18 18:56:27 +0200 |
---|---|---|
committer | Antonio Borneo <borneo.antonio@gmail.com> | 2020-09-05 17:12:39 +0100 |
commit | 99add6227fe0a3be536f9b83ff6aa7dd63a8d2dc (patch) | |
tree | 03e6675ccaf3fbd8f86dfd9922a20574c8ca41cc /src/target/esirisc_jtag.c | |
parent | e66593f8242d49dd05f6b9c4a5121fa466a158aa (diff) | |
download | riscv-openocd-99add6227fe0a3be536f9b83ff6aa7dd63a8d2dc.zip riscv-openocd-99add6227fe0a3be536f9b83ff6aa7dd63a8d2dc.tar.gz riscv-openocd-99add6227fe0a3be536f9b83ff6aa7dd63a8d2dc.tar.bz2 |
target: use proper format with uint32_t
Modify the format strings to properly handle uint32_t data types.
While there, fix prototype mismatch between header and C file of
the function armv7a_l1_d_cache_inval_virt().
Change-Id: I434bd241fa5c38e0c15d22cda2295097050067f5
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/5818
Tested-by: jenkins
Diffstat (limited to 'src/target/esirisc_jtag.c')
-rw-r--r-- | src/target/esirisc_jtag.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/target/esirisc_jtag.c b/src/target/esirisc_jtag.c index 700ae3a..7fd35e5 100644 --- a/src/target/esirisc_jtag.c +++ b/src/target/esirisc_jtag.c @@ -181,8 +181,8 @@ static int esirisc_jtag_check_status(struct esirisc_jtag *jtag_info) { uint8_t eid = esirisc_jtag_get_eid(jtag_info); if (eid != EID_NONE) { - LOG_ERROR("esirisc_jtag: bad status: 0x%02" PRIx32 " (DA: %" PRId32 ", " - "S: %" PRId32 ", EID: 0x%02" PRIx32 ")", + LOG_ERROR("esirisc_jtag: bad status: 0x%02" PRIx8 " (DA: %" PRId32 ", " + "S: %" PRId32 ", EID: 0x%02" PRIx8 ")", jtag_info->status, esirisc_jtag_is_debug_active(jtag_info), esirisc_jtag_is_stopped(jtag_info), eid); return ERROR_FAIL; @@ -201,13 +201,13 @@ static int esirisc_jtag_send_and_recv(struct esirisc_jtag *jtag_info, uint8_t co retval = esirisc_jtag_send(jtag_info, command, num_out_fields, out_fields); if (retval != ERROR_OK) { - LOG_ERROR("esirisc_jtag: send failed (command: 0x%02" PRIx32 ")", command); + LOG_ERROR("esirisc_jtag: send failed (command: 0x%02" PRIx8 ")", command); return ERROR_FAIL; } retval = esirisc_jtag_recv(jtag_info, num_in_fields, in_fields); if (retval != ERROR_OK) { - LOG_ERROR("esirisc_jtag: recv failed (command: 0x%02" PRIx32 ")", command); + LOG_ERROR("esirisc_jtag: recv failed (command: 0x%02" PRIx8 ")", command); return ERROR_FAIL; } @@ -409,7 +409,7 @@ int esirisc_jtag_read_reg(struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t return retval; *data = le_to_h_u32(d); - LOG_DEBUG("register: 0x%" PRIx32 ", data: 0x%" PRIx32, reg, *data); + LOG_DEBUG("register: 0x%" PRIx8 ", data: 0x%" PRIx32, reg, *data); return ERROR_OK; } @@ -419,7 +419,7 @@ int esirisc_jtag_write_reg(struct esirisc_jtag *jtag_info, uint8_t reg, uint32_t struct scan_field out_fields[2]; uint8_t d[4]; - LOG_DEBUG("register: 0x%" PRIx32 ", data: 0x%" PRIx32, reg, data); + LOG_DEBUG("register: 0x%" PRIx8 ", data: 0x%" PRIx32, reg, data); out_fields[0].num_bits = 8; out_fields[0].out_value = ® @@ -457,7 +457,7 @@ int esirisc_jtag_read_csr(struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t return retval; *data = le_to_h_u32(d); - LOG_DEBUG("bank: 0x%" PRIx32 ", csr: 0x%" PRIx32 ", data: 0x%" PRIx32, bank, csr, *data); + LOG_DEBUG("bank: 0x%" PRIx8 ", csr: 0x%" PRIx8 ", data: 0x%" PRIx32, bank, csr, *data); return ERROR_OK; } @@ -467,7 +467,7 @@ int esirisc_jtag_write_csr(struct esirisc_jtag *jtag_info, uint8_t bank, uint8_t struct scan_field out_fields[2]; uint8_t c[2], d[4]; - LOG_DEBUG("bank: 0x%" PRIx32 ", csr: 0x%" PRIx32 ", data: 0x%" PRIx32, bank, csr, data); + LOG_DEBUG("bank: 0x%" PRIx8 ", csr: 0x%" PRIx8 ", data: 0x%" PRIx32, bank, csr, data); out_fields[0].num_bits = 16; out_fields[0].out_value = c; |