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:
@@ -240,13 +240,13 @@ static int w600_write(struct flash_bank *bank, const uint8_t *buffer,
|
||||
}
|
||||
|
||||
if ((offset % W600_FLASH_PAGESIZE) != 0) {
|
||||
LOG_WARNING("offset 0x%" PRIx32 " breaks required %" PRIu32 "-byte alignment",
|
||||
LOG_WARNING("offset 0x%" PRIx32 " breaks required %d-byte alignment",
|
||||
offset, W600_FLASH_PAGESIZE);
|
||||
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
|
||||
}
|
||||
|
||||
if ((count % W600_FLASH_PAGESIZE) != 0) {
|
||||
LOG_WARNING("count 0x%" PRIx32 " breaks required %" PRIu32 "-byte alignment",
|
||||
LOG_WARNING("count 0x%" PRIx32 " breaks required %d-byte alignment",
|
||||
offset, W600_FLASH_PAGESIZE);
|
||||
return ERROR_FLASH_DST_BREAKS_ALIGNMENT;
|
||||
}
|
||||
@@ -323,7 +323,7 @@ static int w600_probe(struct flash_bank *bank)
|
||||
flash_size = 1 << flash_size;
|
||||
}
|
||||
|
||||
LOG_INFO("flash size = %dkbytes", flash_size / 1024);
|
||||
LOG_INFO("flash size = %" PRIu32 "kbytes", flash_size / 1024);
|
||||
|
||||
/* calculate numbers of pages */
|
||||
size_t num_pages = flash_size / W600_FLASH_SECSIZE;
|
||||
|
||||
Reference in New Issue
Block a user