This is an automated email from Gerrit. "Andreas Fritiofson <andreas.fritiof...@gmail.com>" just uploaded a new patch set to Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7438
-- gerrit commit ee4da068a271361a454f1a6aaaae64a45812f20d Author: Andreas Fritiofson <andreas.fritiof...@gmail.com> Date: Wed Jan 18 09:23:32 2023 +0100 stm32f3x: Allow overriding the flash bank size Same mechanism as in stm32f1x.cfg reused here. Change-Id: I81f02feb2b655e8259341b22180f3a8b82e28d05 Signed-off-by: Andreas Fritiofson <andreas.fritiof...@gmail.com> diff --git a/tcl/target/stm32f3x.cfg b/tcl/target/stm32f3x.cfg index 4ecc7eda3c..aa978d9c84 100644 --- a/tcl/target/stm32f3x.cfg +++ b/tcl/target/stm32f3x.cfg @@ -24,6 +24,14 @@ if { [info exists WORKAREASIZE] } { set _WORKAREASIZE 0x4000 } +# Allow overriding the Flash bank size +if { [info exists FLASH_SIZE] } { + set _FLASH_SIZE $FLASH_SIZE +} else { + # autodetect size + set _FLASH_SIZE 0 +} + # JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz # # Since we may be running of an RC oscilator, we crank down the speed a @@ -63,7 +71,7 @@ target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0 set _FLASHNAME $_CHIPNAME.flash -flash bank $_FLASHNAME stm32f1x 0 0 0 0 $_TARGETNAME +flash bank $_FLASHNAME stm32f1x 0 $_FLASH_SIZE 0 0 $_TARGETNAME reset_config srst_nogate --