aboutsummaryrefslogtreecommitdiff
path: root/tcl/target
diff options
context:
space:
mode:
authorSlowcoder <slowcoder@gmail.com>2017-08-31 22:34:16 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2017-10-03 11:28:20 +0100
commit2168c475ff7ca0f2914bee39700952600014ac40 (patch)
treefb8133852ca773c35ba66b0f3b1af335037e542e /tcl/target
parentd43308af7513fa98f6ef1cae75393c8766bd370d (diff)
downloadriscv-openocd-2168c475ff7ca0f2914bee39700952600014ac40.zip
riscv-openocd-2168c475ff7ca0f2914bee39700952600014ac40.tar.gz
riscv-openocd-2168c475ff7ca0f2914bee39700952600014ac40.tar.bz2
nrf5: Add nRF52832-QFAA support
Change-Id: Ica9e34e873cac182662b1e32a9b3164dbc0c935f Signed-off-by: Slowcoder <slowcoder@gmail.com> Reviewed-on: http://openocd.zylin.com/4210 Reviewed-by: Tomas Vanek <vanekt@fbl.cz> Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'tcl/target')
-rw-r--r--tcl/target/nrf52.cfg15
1 files changed, 14 insertions, 1 deletions
diff --git a/tcl/target/nrf52.cfg b/tcl/target/nrf52.cfg
index c1cbf1a..e730175 100644
--- a/tcl/target/nrf52.cfg
+++ b/tcl/target/nrf52.cfg
@@ -10,6 +10,14 @@ if { [info exists CHIPNAME] } {
set _CHIPNAME nrf52
}
+# Work-area is a space in RAM used for flash programming
+# By default use 16kB
+if { [info exists WORKAREASIZE] } {
+ set _WORKAREASIZE $WORKAREASIZE
+} else {
+ set _WORKAREASIZE 0x4000
+}
+
if { [info exists CPUTAPID] } {
set _CPUTAPID $CPUTAPID
} else {
@@ -21,8 +29,13 @@ swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
-adapter_khz 10000
+adapter_khz 1000
+
+$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
if { ![using_hla] } {
cortex_m reset_config sysresetreq
}
+
+flash bank $_CHIPNAME.flash nrf5 0x00000000 0 1 1 $_TARGETNAME
+flash bank $_CHIPNAME.uicr nrf5 0x10001000 0 1 1 $_TARGETNAME