mulle: Update OpenOCD conf to work with 0.9.0
OpenOCD 0.9.0 added a definition of a single flash bank as "$_CHIPNAME.flash" (the chip has two flash banks), the new flash bank definitions are enclosed in catch statements to avoid startup errors. The original configuration when combined with openocd 0.9.0 caused an error during flash probing (which happens during GDB connect), because of three defined flash banks, which made openocd drop the GDB connection.
This commit is contained in:
parent
fc4ab35140
commit
e2d49b43e9
@ -39,16 +39,18 @@ source [find target/k60.cfg]
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Bank definition for the 'program flash' (instructions and/or data)
|
# Bank definition for the 'program flash' (instructions and/or data)
|
||||||
|
# OpenOCD 0.9.0 has a definition of the first flash bank in target/kx.cfg, but
|
||||||
|
# not OpenOCD 0.8.0 and earlier.
|
||||||
#
|
#
|
||||||
flash bank $_CHIPNAME.pflash.0 kinetis 0x00000000 0x20000 0 4 $_TARGETNAME
|
catch {flash bank $_CHIPNAME.flash kinetis 0 0 0 0 $_TARGETNAME}
|
||||||
flash bank $_CHIPNAME.pflash.1 kinetis 0x00020000 0x20000 0 4 $_TARGETNAME
|
catch {flash bank $_CHIPNAME.flash2 kinetis 0 0 0 0 $_TARGETNAME}
|
||||||
|
|
||||||
# Work-area is a space in RAM used for flash programming
|
# Work-area is a space in RAM used for flash programming
|
||||||
# By default use 16kB
|
# By default use 4 kB
|
||||||
if { [info exists WORKAREASIZE] } {
|
if { [info exists WORKAREASIZE] } {
|
||||||
set _WORKAREASIZE $WORKAREASIZE
|
set _WORKAREASIZE $WORKAREASIZE
|
||||||
} else {
|
} else {
|
||||||
set _WORKAREASIZE 0x4000
|
set _WORKAREASIZE 0x1000
|
||||||
}
|
}
|
||||||
|
|
||||||
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
||||||
|
|||||||
@ -38,16 +38,18 @@ source [find target/k60.cfg]
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Bank definition for the 'program flash' (instructions and/or data)
|
# Bank definition for the 'program flash' (instructions and/or data)
|
||||||
|
# OpenOCD 0.9.0 has a definition of the first flash bank in target/kx.cfg, but
|
||||||
|
# not OpenOCD 0.8.0 and earlier.
|
||||||
#
|
#
|
||||||
flash bank $_CHIPNAME.pflash.0 kinetis 0x00000000 0x40000 0 4 $_TARGETNAME
|
catch {flash bank $_CHIPNAME.flash kinetis 0 0 0 0 $_TARGETNAME}
|
||||||
flash bank $_CHIPNAME.pflash.1 kinetis 0x00040000 0x40000 0 4 $_TARGETNAME
|
catch {flash bank $_CHIPNAME.flash2 kinetis 0 0 0 0 $_TARGETNAME}
|
||||||
|
|
||||||
# Work-area is a space in RAM used for flash programming
|
# Work-area is a space in RAM used for flash programming
|
||||||
# By default use 16kB
|
# By default use 4 kB
|
||||||
if { [info exists WORKAREASIZE] } {
|
if { [info exists WORKAREASIZE] } {
|
||||||
set _WORKAREASIZE $WORKAREASIZE
|
set _WORKAREASIZE $WORKAREASIZE
|
||||||
} else {
|
} else {
|
||||||
set _WORKAREASIZE 0x4000
|
set _WORKAREASIZE 0x1000
|
||||||
}
|
}
|
||||||
|
|
||||||
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user