aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/at91samd.c
diff options
context:
space:
mode:
authorPaul Fertser <fercerpav@gmail.com>2014-04-28 15:05:02 +0400
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>2014-05-05 20:18:38 +0000
commitb1a1a48b30243d3582a8443f4baf3dd500683eda (patch)
tree8cc82a9548c72fdd1fe4aae3a86fe812cf44605c /src/flash/nor/at91samd.c
parent66c6665288402ef8463e844f8873b2c8d3a9949d (diff)
downloadriscv-openocd-b1a1a48b30243d3582a8443f4baf3dd500683eda.zip
riscv-openocd-b1a1a48b30243d3582a8443f4baf3dd500683eda.tar.gz
riscv-openocd-b1a1a48b30243d3582a8443f4baf3dd500683eda.tar.bz2
Fix some C99 format specifiers
As exposed by arm-none-eabi build, fix the wrong modifiers. Change-Id: Ia6ce7c5c1d40e95059525c3e5d81b752df2fea7c Signed-off-by: Paul Fertser <fercerpav@gmail.com> Reviewed-on: http://openocd.zylin.com/2122 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash/nor/at91samd.c')
-rw-r--r--src/flash/nor/at91samd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c
index bfd2c6a..17bc8b9 100644
--- a/src/flash/nor/at91samd.c
+++ b/src/flash/nor/at91samd.c
@@ -26,7 +26,7 @@
#define SAMD_NUM_SECTORS 16
-#define SAMD_FLASH 0x00000000 /* physical Flash memory */
+#define SAMD_FLASH ((uint32_t)0x00000000) /* physical Flash memory */
#define SAMD_DSU 0x41002000 /* Device Service Unit */
#define SAMD_NVMCTRL 0x41004000 /* Non-volatile memory controller */
@@ -218,7 +218,7 @@ static int samd_probe(struct flash_bank *bank)
* multiplied by the number of pages. */
if (bank->size != chip->num_pages * chip->page_size) {
LOG_WARNING("SAMD: bank size doesn't match NVM parameters. "
- "Identified %uKB Flash but NVMCTRL reports %u %uB pages",
+ "Identified %" PRIu32 "KB Flash but NVMCTRL reports %u %" PRIu32 "B pages",
part->flash_kb, chip->num_pages, chip->page_size);
}
@@ -243,7 +243,7 @@ static int samd_probe(struct flash_bank *bank)
/* Done */
chip->probed = true;
- LOG_INFO("SAMD MCU: %s (%uKB Flash, %uKB RAM)", part->name,
+ LOG_INFO("SAMD MCU: %s (%" PRIu32 "KB Flash, %" PRIu32 "KB RAM)", part->name,
part->flash_kb, part->ram_kb);
return ERROR_OK;
@@ -337,7 +337,7 @@ static int samd_erase_row(struct flash_bank *bank, uint32_t address)
}
if (res != ERROR_OK || error) {
- LOG_ERROR("Failed to erase row containing %08X" PRIx32, address);
+ LOG_ERROR("Failed to erase row containing %08" PRIx32, address);
return ERROR_FAIL;
}