Add Openocd debug configuration and gdb init script.
[bertos.git] / bertos / cpu / arm / scripts / openocd / debug.cfg
diff --git a/bertos/cpu/arm/scripts/openocd/debug.cfg b/bertos/cpu/arm/scripts/openocd/debug.cfg
new file mode 100644 (file)
index 0000000..70e33c0
--- /dev/null
@@ -0,0 +1,23 @@
+# Change the default telnet port...
+telnet_port 4444
+
+# Port for TCL connection.
+tcl_port 6666
+
+# GDB connects here
+gdb_port 3333
+
+source [find PROGRAMMER_TYPE]
+
+source [find PROGRAMMER_CPU]
+
+$_TARGETNAME configure -event reset-start {
+       cpu_setup
+}
+
+$_TARGETNAME configure -event gdb-detach {
+       shutdown
+}
+
+init
+reset run