summaryrefslogtreecommitdiff
path: root/openocd
diff options
context:
space:
mode:
Diffstat (limited to 'openocd')
-rw-r--r--openocd/openocd.common.cfg10
-rw-r--r--openocd/openocd.stm32f072disco.cfg14
-rw-r--r--openocd/openocd.stm32f072disco.local.cfg2
-rw-r--r--openocd/openocd.stm32f4-disco.cfg8
-rw-r--r--openocd/openocd.stm32f4-disco.local.cfg2
-rw-r--r--openocd/openocd.stm32l1-generic.cfg15
6 files changed, 47 insertions, 4 deletions
diff --git a/openocd/openocd.common.cfg b/openocd/openocd.common.cfg
new file mode 100644
index 0000000..b601cde
--- /dev/null
+++ b/openocd/openocd.common.cfg
@@ -0,0 +1,10 @@
+# Shared openocd script helpers
+
+# put things like "hla_serial 'asdfadfa'" in openocd.<board>.local.cfg to support
+# multiple simultaneously connected boards.
+proc optional_local { LOCAL_FILE } {
+ if { [ file exists $LOCAL_FILE ] } {
+ puts "Loading custom local settings from $LOCAL_FILE"
+ source $LOCAL_FILE
+ }
+}
diff --git a/openocd/openocd.stm32f072disco.cfg b/openocd/openocd.stm32f072disco.cfg
new file mode 100644
index 0000000..b7cc25b
--- /dev/null
+++ b/openocd/openocd.stm32f072disco.cfg
@@ -0,0 +1,14 @@
+source [find interface/stlink-v2.cfg]
+set WORKAREASIZE 0x4000
+source [find target/stm32f0x.cfg]
+
+source openocd.common.cfg
+optional_local "openocd.stm32f072disco.local.cfg"
+
+# no trace on cm0
+#tpiu config internal swodump.stm32f4disco.log uart off 168000000
+
+# Uncomment to reset on connect, for grabbing under WFI et al
+reset_config srst_only srst_nogate
+# reset_config srst_only srst_nogate connect_assert_srst
+
diff --git a/openocd/openocd.stm32f072disco.local.cfg b/openocd/openocd.stm32f072disco.local.cfg
new file mode 100644
index 0000000..f81e2a3
--- /dev/null
+++ b/openocd/openocd.stm32f072disco.local.cfg
@@ -0,0 +1,2 @@
+# serial of my f072 disco board.
+hla_serial "Q?o\x06PgHW#$\x16?"
diff --git a/openocd/openocd.stm32f4-disco.cfg b/openocd/openocd.stm32f4-disco.cfg
index 478fe30..a93997c 100644
--- a/openocd/openocd.stm32f4-disco.cfg
+++ b/openocd/openocd.stm32f4-disco.cfg
@@ -2,12 +2,12 @@ source [find interface/stlink-v2.cfg]
set WORKAREASIZE 0x4000
source [find target/stm32f4x.cfg]
-# serial of my f4 disco board.
-hla_serial "W?k\x06IgHV0H\x10?"
+source openocd.common.cfg
+optional_local "openocd.stm32f4-disco.local.cfg"
tpiu config internal swodump.stm32f4disco.log uart off 168000000
# Uncomment to reset on connect, for grabbing under WFI et al
-reset_config srst_only srst_nogate
-# reset_config srst_only srst_nogate connect_assert_srst
+#reset_config srst_only srst_nogate
+reset_config srst_only srst_nogate connect_assert_srst
diff --git a/openocd/openocd.stm32f4-disco.local.cfg b/openocd/openocd.stm32f4-disco.local.cfg
new file mode 100644
index 0000000..8cace82
--- /dev/null
+++ b/openocd/openocd.stm32f4-disco.local.cfg
@@ -0,0 +1,2 @@
+# serial of my f4 disco board.
+hla_serial "W?k\x06IgHV0H\x10?"
diff --git a/openocd/openocd.stm32l1-generic.cfg b/openocd/openocd.stm32l1-generic.cfg
new file mode 100644
index 0000000..6b39750
--- /dev/null
+++ b/openocd/openocd.stm32l1-generic.cfg
@@ -0,0 +1,15 @@
+# l1 generic, using a l4 disco board
+#source [find interface/stlink-v2-1.cfg]
+# l1 disco itself or similar
+source [find interface/stlink-v2.cfg]
+set WORKAREASIZE 0x2000
+source [find target/stm32l1.cfg]
+
+#hla_serial "066DFF495351885087171826" # My l4 disco
+hla_serial "S?l\x06H?WQ%\x10\x18?" # My l1 disco
+
+tpiu config internal swodump.stm32l1-generic.log uart off 32000000
+
+# Uncomment to reset on connect, for grabbing under WFI et al
+reset_config srst_only srst_nogate
+# reset_config srst_only srst_nogate connect_assert_srst