tcl/target: fix rp2040-core0.cfg work area backup.
The work area should be backed up. The flash probe runs an algorithm on the target CPU. The flash is probed during gdb connect if gdb_memory_map is enabled (is enabled by default). Without backup the target memory gets corrupted on gdb connect. Change-Id: I3344b9dc6cbf904d49f3b05ab104b541d1d63422 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/7257 Tested-by: jenkins Reviewed-by: Jonathan Bell <jonathan@raspberrypi.com>
This commit is contained in:
parent
dc6cad855d
commit
9d5f833fbd
|
@ -26,7 +26,10 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
|
||||||
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
|
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
|
||||||
set _TARGETNAME $_CHIPNAME.cpu
|
set _TARGETNAME $_CHIPNAME.cpu
|
||||||
target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
|
target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
|
||||||
$_TARGETNAME configure -work-area-phys 0x20010000 -work-area-size $_WORKAREASIZE
|
|
||||||
|
# Backup the work area. The flash probe runs an algorithm on the target CPU.
|
||||||
|
# The flash is probed during gdb connect if gdb_memory_map is enabled (by default).
|
||||||
|
$_TARGETNAME configure -work-area-phys 0x20010000 -work-area-size $_WORKAREASIZE -work-area-backup 1
|
||||||
|
|
||||||
set _FLASHNAME $_CHIPNAME.flash
|
set _FLASHNAME $_CHIPNAME.flash
|
||||||
set _FLASHSIZE 0x200000
|
set _FLASHSIZE 0x200000
|
||||||
|
|
Loading…
Reference in New Issue