fixup F103x8 flash size before build dfu iface string

we handle F103x8 as F103xB with 128k flash
This commit is contained in:
zvova7890 2020-01-18 16:42:10 +02:00 committed by UweBonnes
parent 45fb12f9b6
commit 7a595ead25
1 changed files with 2 additions and 2 deletions

View File

@ -352,9 +352,9 @@ static char *get_dev_unique_id(char *s)
/* Calculated the upper flash limit from the exported data
in theparameter block*/
fuse_flash_size = *(uint32_t *) FLASH_SIZE_R & 0xfff;
set_dfu_iface_string(fuse_flash_size - 8);
if (fuse_flash_size == 0x40) /* Handle F103x8 as F103xC! */
if (fuse_flash_size == 0x40) /* Handle F103x8 as F103xB! */
fuse_flash_size = 0x80;
set_dfu_iface_string(fuse_flash_size - 8);
max_address = FLASH_BASE + (fuse_flash_size << 10);
/* If bootloader pages are write protected or device is read
* protected, deny bootloader update.