summaryrefslogtreecommitdiff
path: root/openocd.cfg
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-05-11 11:36:52 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-05-11 11:36:52 +0200
commit8665bdbf682bdff02576a6f4393f09bc56572043 (patch)
tree54b1f51c0b3e5f5dd577720a9cd54e28be19d97f /openocd.cfg
parenteabbd037f5f605a9ecf06185cd62594eb4564bce (diff)
downloadradio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.tar.gz
radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.tar.bz2
radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.tar.xz
radio-controller-8665bdbf682bdff02576a6f4393f09bc56572043.zip
wip
Diffstat (limited to 'openocd.cfg')
-rw-r--r--openocd.cfg18
1 files changed, 16 insertions, 2 deletions
diff --git a/openocd.cfg b/openocd.cfg
index 15a42d4..48d7292 100644
--- a/openocd.cfg
+++ b/openocd.cfg
@@ -1,5 +1,19 @@
-source [find interface/stlink-v2.cfg]
-source [find target/stm32f1x.cfg]
+if { [info exists env(DEVICE)] } {
+ set device $env(DEVICE)
+} else {
+ set device "stlink-v2"
+}
+
+switch $device {
+ "stlink-v2" {
+ source [find interface/stlink-v2.cfg]
+ }
+ "olimex-arm-usb-tiny-h" {
+ source [find interface/ftdi/olimex-arm-usb-tiny-h.cfg]
+ source [find interface/ftdi/olimex-arm-jtag-swd.cfg]
+ source [find target/stm32f1x.cfg]
+ }
+}
telnet_port disabled
tcl_port disabled