X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fflash%2Fecos.c;h=4c903210537e7f4ee019bf7bf7a89ce1916dc125;hb=50c086ffb94f199c088f4cc52b7887b668dddf00;hp=5f0fffbfe79fe9959a74354b04b68b5e0d66a52b;hpb=1840226d555b9863a2315bcc6218671fdfa2af32;p=openocd.git diff --git a/src/flash/ecos.c b/src/flash/ecos.c index 5f0fffbfe7..4c90321053 100644 --- a/src/flash/ecos.c +++ b/src/flash/ecos.c @@ -139,7 +139,7 @@ static int ecosflash_flash_bank_command(struct command_context_s *cmd_ctx, char } info = malloc(sizeof(ecosflash_flash_bank_t)); - if(info == NULL) + if (info == NULL) { LOG_ERROR("no memory for flash bank info"); exit(-1); @@ -205,7 +205,7 @@ static int loadDriver(ecosflash_flash_bank_t *info) } target_write_buffer(target, image.sections[i].base_address, buf_cnt, buffer); image_size += buf_cnt; - LOG_DEBUG("%u byte written at address 0x%8.8x", buf_cnt, image.sections[i].base_address); + LOG_DEBUG("%" PRIu32 " byte written at address 0x%8.8" PRIx32 "", buf_cnt, image.sections[i].base_address); free(buffer); } @@ -287,7 +287,7 @@ static int eCosBoard_erase(ecosflash_flash_bank_t *info, uint32_t address, uint3 if (flashErr != 0x0) { - LOG_ERROR("Flash erase failed with %d (%s)\n", flashErr, flash_errmsg(flashErr)); + LOG_ERROR("Flash erase failed with %d (%s)\n", (int)flashErr, flash_errmsg(flashErr)); return ERROR_FAIL; } @@ -346,7 +346,7 @@ static int eCosBoard_flash(ecosflash_flash_bank_t *info, void *data, uint32_t ad if (flashErr != 0x0) { - LOG_ERROR("Flash prog failed with %d (%s)\n", flashErr, flash_errmsg(flashErr)); + LOG_ERROR("Flash prog failed with %d (%s)\n", (int)flashErr, flash_errmsg(flashErr)); return ERROR_FAIL; } }