aboutsummaryrefslogtreecommitdiff
path: root/openocd
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-08-23 17:08:59 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2018-08-23 17:12:21 +0200
commit3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a (patch)
treeab49cc16ed0b853452c5c2ed2d3042416d628986 /openocd
downloadiot-sensors-3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a.tar.gz
iot-sensors-3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a.tar.bz2
iot-sensors-3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a.tar.xz
iot-sensors-3061ecca3d0fdfb87dabbf5f63c9e06c2a30f53a.zip
o Initial import.HEADmaster
Diffstat (limited to 'openocd')
-rw-r--r--openocd/nrf52.cfg28
-rw-r--r--openocd/openocd-stlink.cfg7
2 files changed, 35 insertions, 0 deletions
diff --git a/openocd/nrf52.cfg b/openocd/nrf52.cfg
new file mode 100644
index 0000000..c1cbf1a
--- /dev/null
+++ b/openocd/nrf52.cfg
@@ -0,0 +1,28 @@
+#
+# Nordic nRF52 series: ARM Cortex-M4 @ 64 MHz
+#
+
+source [find target/swj-dp.tcl]
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $CHIPNAME
+} else {
+ set _CHIPNAME nrf52
+}
+
+if { [info exists CPUTAPID] } {
+ set _CPUTAPID $CPUTAPID
+} else {
+ set _CPUTAPID 0x2ba01477
+}
+
+swj_newdap $_CHIPNAME cpu -expected-id $_CPUTAPID
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
+
+adapter_khz 10000
+
+if { ![using_hla] } {
+ cortex_m reset_config sysresetreq
+}
diff --git a/openocd/openocd-stlink.cfg b/openocd/openocd-stlink.cfg
new file mode 100644
index 0000000..33ed847
--- /dev/null
+++ b/openocd/openocd-stlink.cfg
@@ -0,0 +1,7 @@
+source [find interface/stlink-v2.cfg]
+#source [find target/stm32f1x.cfg]
+source [find nrf52.cfg]
+
+gdb_port 3333
+tcl_port disabled
+telnet_port 4444