aboutsummaryrefslogtreecommitdiff
path: root/openocd
diff options
context:
space:
mode:
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