cfg: use consistent chipname
[openocd.git] / tcl / target / stm32f2x_stlink.cfg
blobbb113e04e98495e4119e82b18e901b1adbf851f5
4 if { [info exists CHIPNAME] } {
5    set _CHIPNAME $CHIPNAME
6 } else {
7    set _CHIPNAME stm32
10 # Work-area is a space in RAM used for flash programming
11 # By default use 64kB
12 if { [info exists WORKAREASIZE] } {
13    set _WORKAREASIZE $WORKAREASIZE
14 } else {
15    set _WORKAREASIZE 0x10000
18 if { [info exists CPUTAPID] } {
19    set _CPUTAPID $CPUTAPID
20 } else {
21    set _CPUTAPID 0x2ba01477
24 stlink newtap $_CHIPNAME cpu -expected-id $_CPUTAPID
26 set _TARGETNAME $_CHIPNAME.cpu
27 target create $_TARGETNAME stm32_stlink -chain-position $_TARGETNAME
29 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
31 set _FLASHNAME $_CHIPNAME.flash
32 flash bank $_FLASHNAME stm32f2x 0x08000000 0 0 0 $_TARGETNAME