aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorduane <duane@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-21 03:15:51 +0000
committerduane <duane@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-21 03:15:51 +0000
commite06e22dbbd181818654014224094ba239099afd3 (patch)
tree44ff90d7c333a0d19a35a3c6cd8297e2e76a65f4 /src/target
parentaabee7e8cadafb37c35982ec5506df2cf51afc11 (diff)
downloadriscv-openocd-e06e22dbbd181818654014224094ba239099afd3.zip
riscv-openocd-e06e22dbbd181818654014224094ba239099afd3.tar.gz
riscv-openocd-e06e22dbbd181818654014224094ba239099afd3.tar.bz2
C99 printf() -Werror fixes
git-svn-id: svn://svn.berlios.de/openocd/trunk@2309 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/target')
-rw-r--r--src/target/armv4_5.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/target/armv4_5.c b/src/target/armv4_5.c
index 011b42b..1817a3c 100644
--- a/src/target/armv4_5.c
+++ b/src/target/armv4_5.c
@@ -297,7 +297,7 @@ int armv4_5_arch_state(struct target_s *target)
exit(-1);
}
- LOG_USER("target halted in %s state due to %s, current mode: %s\ncpsr: 0x%8.8x pc: 0x%8.8x",
+ LOG_USER("target halted in %s state due to %s, current mode: %s\ncpsr: 0x%8.8" PRIx32 " pc: 0x%8.8" PRIx32 "",
armv4_5_state_strings[armv4_5->core_state],
Jim_Nvp_value2name_simple( nvp_target_debug_reason, target->debug_reason )->name,
armv4_5_mode_strings[armv4_5_mode_to_number(armv4_5->core_mode)],
@@ -339,12 +339,16 @@ int handle_armv4_5_reg_command(struct command_context_s *cmd_ctx, char *cmd, cha
{
armv4_5->full_context(target);
}
- output_len += snprintf(output + output_len, 128 - output_len, "%8s: %8.8x ", ARMV4_5_CORE_REG_MODENUM(armv4_5->core_cache, mode, num).name,
- buf_get_u32(ARMV4_5_CORE_REG_MODENUM(armv4_5->core_cache, mode, num).value, 0, 32));
+ output_len += snprintf(output + output_len,
+ 128 - output_len,
+ "%8s: %8.8" PRIx32 " ",
+ ARMV4_5_CORE_REG_MODENUM(armv4_5->core_cache, mode, num).name,
+ buf_get_u32(ARMV4_5_CORE_REG_MODENUM(armv4_5->core_cache, mode, num).value, 0, 32));
}
command_print(cmd_ctx, "%s", output);
}
- command_print(cmd_ctx, " cpsr: %8.8x spsr_fiq: %8.8x spsr_irq: %8.8x spsr_svc: %8.8x spsr_abt: %8.8x spsr_und: %8.8x",
+ command_print(cmd_ctx,
+ " cpsr: %8.8" PRIx32 " spsr_fiq: %8.8" PRIx32 " spsr_irq: %8.8" PRIx32 " spsr_svc: %8.8" PRIx32 " spsr_abt: %8.8" PRIx32 " spsr_und: %8.8" PRIx32 "",
buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_CPSR].value, 0, 32),
buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_SPSR_FIQ].value, 0, 32),
buf_get_u32(armv4_5->core_cache->reg_list[ARMV4_5_SPSR_IRQ].value, 0, 32),
@@ -507,7 +511,7 @@ static int armv4_5_run_algorithm_completion(struct target_s *target, uint32_t ex
}
if (buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32) != exit_point)
{
- LOG_WARNING("target reentered debug state, but not at the desired exit point: 0x%4.4x",
+ LOG_WARNING("target reentered debug state, but not at the desired exit point: 0x%4.4" PRIx32 "",
buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32));
return ERROR_TARGET_TIMEOUT;
}
@@ -654,7 +658,7 @@ int armv4_5_run_algorithm_inner(struct target_s *target, int num_mem_params, mem
regvalue = buf_get_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).value, 0, 32);
if (regvalue != context[i])
{
- LOG_DEBUG("restoring register %s with value 0x%8.8x", ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).name, context[i]);
+ LOG_DEBUG("restoring register %s with value 0x%8.8" PRIx32 "", ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).name, context[i]);
buf_set_u32(ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).value, 0, 32, context[i]);
ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).valid = 1;
ARMV4_5_CORE_REG_MODE(armv4_5->core_cache, armv4_5_algorithm_info->core_mode, i).dirty = 1;