X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fat91samd.c;h=17bc8b99cbcafed2b6bee3a609a32580e99a4576;hb=refs%2Fchanges%2F22%2F2122%2F2;hp=bfd2c6ab0510d3025a90b37d813c6473f0aef8dc;hpb=66c6665288402ef8463e844f8873b2c8d3a9949d;p=openocd.git diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c index bfd2c6ab05..17bc8b99cb 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; }