diff options
author | Tomas Vanek <vanekt@fbl.cz> | 2022-10-11 19:04:15 +0200 |
---|---|---|
committer | Tomas Vanek <vanekt@fbl.cz> | 2022-10-12 11:12:09 +0000 |
commit | 9d5f833fbd47a5a0631fa1f6f1734f277fdde342 (patch) | |
tree | 19b508a599495184d7e391c0d3b7b8e4fee0f9d3 | |
parent | dc6cad855d1557e01437ba777b55ad023ddd04ef (diff) | |
download | riscv-openocd-9d5f833fbd47a5a0631fa1f6f1734f277fdde342.zip riscv-openocd-9d5f833fbd47a5a0631fa1f6f1734f277fdde342.tar.gz riscv-openocd-9d5f833fbd47a5a0631fa1f6f1734f277fdde342.tar.bz2 |
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>
-rw-r--r-- | tcl/target/rp2040-core0.cfg | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tcl/target/rp2040-core0.cfg b/tcl/target/rp2040-core0.cfg index 8c3533b..6a0f0ed 100644 --- a/tcl/target/rp2040-core0.cfg +++ b/tcl/target/rp2040-core0.cfg @@ -26,7 +26,10 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu set _TARGETNAME $_CHIPNAME.cpu 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 _FLASHSIZE 0x200000 |