File tree 1 file changed +9
-1
lines changed
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ if { [info exists WORKAREASIZE] } {
24
24
set _WORKAREASIZE 0x4000
25
25
}
26
26
27
+ # Allow overriding the Flash bank size
28
+ if { [info exists FLASH_SIZE] } {
29
+ set _FLASH_SIZE $FLASH_SIZE
30
+ } else {
31
+ # autodetect size
32
+ set _FLASH_SIZE 0
33
+ }
34
+
27
35
# JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz
28
36
#
29
37
# 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
63
71
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
64
72
65
73
set _FLASHNAME $_CHIPNAME.flash
66
- flash bank $_FLASHNAME stm32f1x 0 0 0 0 $_TARGETNAME
74
+ flash bank $_FLASHNAME stm32f1x 0 $_FLASH_SIZE 0 0 $_TARGETNAME
67
75
68
76
reset_config srst_nogate
69
77
You can’t perform that action at this time.
0 commit comments