flash: use proper format with uint32_t
Modify the format strings to properly handle uint32_t data types. Change the type of variable retval in 'nor/ambiqmicro.c' to match both the value to carry and the returned type of the function. Fix the prototype mismatch of function lpc2900_address2sector() between the header and the C file. Change-Id: I68ffba9bd83eec8132f83bff3af993861fd09d84 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5816 Tested-by: jenkins
This commit is contained in:
@@ -189,7 +189,7 @@ static int fespi_write_reg(struct flash_bank *bank, target_addr_t address, uint3
|
||||
|
||||
int result = target_write_u32(target, fespi_info->ctrl_base + address, value);
|
||||
if (result != ERROR_OK) {
|
||||
LOG_ERROR("fespi_write_reg() error writing 0x%x to " TARGET_ADDR_FMT,
|
||||
LOG_ERROR("fespi_write_reg() error writing 0x%" PRIx32 " to " TARGET_ADDR_FMT,
|
||||
value, fespi_info->ctrl_base + address);
|
||||
return result;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ static int fespi_rx(struct flash_bank *bank, uint8_t *out)
|
||||
break;
|
||||
int64_t now = timeval_ms();
|
||||
if (now - start > 1000) {
|
||||
LOG_ERROR("rxfifo didn't go positive (value=0x%x).", value);
|
||||
LOG_ERROR("rxfifo didn't go positive (value=0x%" PRIx32 ").", value);
|
||||
return ERROR_TARGET_TIMEOUT;
|
||||
}
|
||||
}
|
||||
@@ -438,7 +438,7 @@ static int slow_fespi_write_buffer(struct flash_bank *bank,
|
||||
uint32_t ii;
|
||||
|
||||
if (offset & 0xFF000000) {
|
||||
LOG_ERROR("FESPI interface does not support greater than 3B addressing, can't write to offset 0x%x",
|
||||
LOG_ERROR("FESPI interface does not support greater than 3B addressing, can't write to offset 0x%" PRIx32,
|
||||
offset);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
@@ -651,7 +651,7 @@ static int steps_add_buffer_write(struct algorithm_steps *as,
|
||||
const uint8_t *buffer, uint32_t chip_offset, uint32_t len)
|
||||
{
|
||||
if (chip_offset & 0xFF000000) {
|
||||
LOG_ERROR("FESPI interface does not support greater than 3B addressing, can't write to offset 0x%x",
|
||||
LOG_ERROR("FESPI interface does not support greater than 3B addressing, can't write to offset 0x%" PRIx32,
|
||||
chip_offset);
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user