summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2019-08-31 16:05:47 -0400
committerBrian Cully <bjc@kublai.com>2019-08-31 16:33:19 -0400
commitcb0243a8e90414aa33a19e21631e3d9d2e1c40c4 (patch)
tree8ab398dc80c668f140a1bfcc0cbc840c02661ea0
parent5c7098f2a41b68fc18b4eb18482dc2da21df3d43 (diff)
downloadbleusb-cb0243a8e90414aa33a19e21631e3d9d2e1c40c4.tar.gz
bleusb-cb0243a8e90414aa33a19e21631e3d9d2e1c40c4.zip
WIP: SAMD GDB stuff
This isn't quite working.
-rw-r--r--usb/.cargo/config4
-rw-r--r--usb/.gdbinit12
-rw-r--r--usb/openocd.conf11
3 files changed, 27 insertions, 0 deletions
diff --git a/usb/.cargo/config b/usb/.cargo/config
index b10f29d..9a30220 100644
--- a/usb/.cargo/config
+++ b/usb/.cargo/config
@@ -1,2 +1,6 @@
[build]
target = "thumbv6m-none-eabi"
+
+[target.thumbv6m-none-eabi]
+rustflags = ["-C", "link-arg=-Tlink.x"]
+runner = "gdb-multiarch"
diff --git a/usb/.gdbinit b/usb/.gdbinit
new file mode 100644
index 0000000..2782abd
--- /dev/null
+++ b/usb/.gdbinit
@@ -0,0 +1,12 @@
+# print demangled symbols by default
+set print asm-demangle on
+
+# OpenOCD
+set remote hardware-breakpoint-limit 4
+set remote hardware-watchpoint-limit 2
+target extended-remote :3334
+#target remote :3333
+#monitor flash breakpoints 1
+monitor arm semihosting enable
+monitor arm semihosting_fileio enable
+#monitor arm semihosting IOClient 3
diff --git a/usb/openocd.conf b/usb/openocd.conf
new file mode 100644
index 0000000..586c517
--- /dev/null
+++ b/usb/openocd.conf
@@ -0,0 +1,11 @@
+gdb_port 3334
+telnet_port 4445
+tcl_port 6667
+
+source [find interface/stlink-v2.cfg]
+set TRANSPORT stlink_jtag
+set CPUTAPID 0x0bc11477
+source [find target/at91samdXX.cfg]
+
+adapter_khz 3750
+reset_config srst_only srst_nogate