add CDC mode only for use with Arduino touch 1200

fix issue with reading current.uf2 size when flashed with jlink
This commit is contained in:
hathach
2018-08-16 19:27:27 +07:00
parent 0b3f49f4a1
commit 8c66a55511
4 changed files with 24 additions and 6 deletions

View File

@ -135,7 +135,14 @@ static uint32_t get_flash_size(void)
const bootloader_settings_t * boot_setting;
bootloader_util_settings_get(&boot_setting);
// if bank0 size is not valid, happens when flashed with jlink
// use maximum application size
flash_sz = boot_setting->bank_0_size;
if ( (flash_sz == 0) || (flash_sz == 0xFFFFFFFFUL) )
{
flash_sz = FLASH_SIZE;
}
}
}