summaryrefslogtreecommitdiffstats
path: root/usb
diff options
context:
space:
mode:
Diffstat (limited to 'usb')
-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