From: Bdale Garbee Date: Mon, 8 Oct 2018 22:06:29 +0000 (-0600) Subject: add new script that uses openocd to reset an LPC target X-Git-Tag: 1.8.7~3^2~2 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=6f25d2359151fb114e22bf8e3b15c007cfb464b5;hp=2bcbd39a37cf1fa0002345d5c401869a387dc84f add new script that uses openocd to reset an LPC target --- diff --git a/ao-tools/ao-flash/Makefile.am b/ao-tools/ao-flash/Makefile.am index 4231dc21..ed928439 100644 --- a/ao-tools/ao-flash/Makefile.am +++ b/ao-tools/ao-flash/Makefile.am @@ -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 index 00000000..d4316136 --- /dev/null +++ b/ao-tools/ao-flash/ao-reset-lpc @@ -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 index 00000000..826b6fbf --- /dev/null +++ b/ao-tools/ao-flash/ao-reset-lpc.1 @@ -0,0 +1,35 @@ +.\" +.\" Copyright © 2018 Bdale Garbee +.\" +.\" 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 +