add new script that uses openocd to reset an LPC target
authorBdale Garbee <bdale@gag.com>
Mon, 8 Oct 2018 22:06:29 +0000 (16:06 -0600)
committerBdale Garbee <bdale@gag.com>
Mon, 8 Oct 2018 22:06:29 +0000 (16:06 -0600)
ao-tools/ao-flash/Makefile.am
ao-tools/ao-flash/ao-reset-lpc [new file with mode: 0755]
ao-tools/ao-flash/ao-reset-lpc.1 [new file with mode: 0644]

index 4231dc2133d1dd069790ef7cc1df25f74b305198..ed9284397dc3a817b4dad9139ffdb33a242b5633 100644 (file)
@@ -1,3 +1,3 @@
-bin_SCRIPTS=ao-flash-stm ao-flash-lpc ao-flash-stm32f0x
+bin_SCRIPTS=ao-flash-stm ao-flash-lpc ao-flash-stm32f0x ao-reset-lpc
 
 
-man_MANS = ao-flash-stm.1 ao-flash-lpc.1 ao-flash-stm32f0x.1
+man_MANS = ao-flash-stm.1 ao-flash-lpc.1 ao-flash-stm32f0x.1 ao-reset-lpc.1
diff --git a/ao-tools/ao-flash/ao-reset-lpc b/ao-tools/ao-flash/ao-reset-lpc
new file mode 100755 (executable)
index 0000000..d431613
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+cmds=/tmp/flash$$
+trap "rm $cmds" 0 1 15
+echo "reset" > $cmds
+openocd \
+       -f interface/stlink-v2.cfg \
+       -f target/lpc11xx.cfg \
+       -f $cmds \
+       -c shutdown
diff --git a/ao-tools/ao-flash/ao-reset-lpc.1 b/ao-tools/ao-flash/ao-reset-lpc.1
new file mode 100644 (file)
index 0000000..826b6fb
--- /dev/null
@@ -0,0 +1,35 @@
+.\"
+.\" Copyright © 2018 Bdale Garbee <bdale@gag.com>
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful, but
+.\" WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+.\" General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License along
+.\" with this program; if not, write to the Free Software Foundation, Inc.,
+.\" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
+.\"
+.\"
+.TH AO-RESET-LPC 1 "ao-reset-lpc" ""
+.SH NAME
+ao-reset-lpc \- reset an LPC11U14-based AltOS device using openocd
+.SH SYNOPSIS
+.B "ao-reset-lpc"
+.SH DESCRIPTION
+.I ao-reset-lpc
+resets the target device.
+.SH USAGE
+.I ao-reset-lpc
+is a simple script that passes the correct arguments to openocd to
+reset the target device via a connected STlink debugging dongle.
+.SH "SEE ALSO"
+openocd(1)
+.SH AUTHOR
+Bdale Garbee
+