From: Dave Murphy Date: Sun, 6 Jan 2013 15:33:48 +0000 (+0000) Subject: fix write_flash size of len for 64bit X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=da129b2ccdc00ff9a33c708718656935cc0efe82;p=fw%2Fstlink fix write_flash size of len for 64bit --- diff --git a/src/stlink-common.c b/src/stlink-common.c index 1ac3d60..82d6070 100644 --- a/src/stlink-common.c +++ b/src/stlink-common.c @@ -1415,7 +1415,7 @@ int stm32l1_write_half_pages(stlink_t *sl, stm32_addr_t addr, uint8_t* base, uns return 0; } -int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, unsigned len) { +int stlink_write_flash(stlink_t *sl, stm32_addr_t addr, uint8_t* base, uint32_t len) { size_t off; flash_loader_t fl; ILOG("Attempting to write %d (%#x) bytes to stm32 address: %u (%#x)\n", diff --git a/src/stlink-common.h b/src/stlink-common.h index 6496a10..a2b73d9 100644 --- a/src/stlink-common.h +++ b/src/stlink-common.h @@ -410,10 +410,10 @@ static const chip_params_t devices[] = { // unprocessed int stlink_erase_flash_mass(stlink_t* sl); - int stlink_write_flash(stlink_t* sl, stm32_addr_t address, uint8_t* data, unsigned length); + int stlink_write_flash(stlink_t* sl, stm32_addr_t address, uint8_t* data, uint32_t length); int stlink_fwrite_flash(stlink_t *sl, const char* path, stm32_addr_t addr); int stlink_fwrite_sram(stlink_t *sl, const char* path, stm32_addr_t addr); - int stlink_verify_write_flash(stlink_t *sl, stm32_addr_t address, uint8_t *data, unsigned length); + int stlink_verify_write_flash(stlink_t *sl, stm32_addr_t address, uint8_t *data, uint32_t length); // PUBLIC uint32_t stlink_chip_id(stlink_t *sl);