From 8bafed71ec1fc9bf12db7b3b02b6824ef5133903 Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Thu, 2 Jan 2020 08:14:47 +0000 Subject: [PATCH] Bug 558266: Add ST-LINK definitions Change-Id: I01bb9b09af6bc9b2f38169acc3ce29b2d87ccc1e --- .../META-INF/MANIFEST.MF | 2 +- .../plugin.properties | 4 +- .../plugin.xml | 5 ++ .../debug/gdbjtag/core/jtagdevice/STLink.java | 51 +++++++++++++++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/STLink.java diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF b/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF index f299161fafd..686cc84fa77 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.core;singleton:=true -Bundle-Version: 9.4.0.qualifier +Bundle-Version: 9.5.0.qualifier Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.core.Activator Bundle-Localization: plugin Require-Bundle: org.eclipse.core.runtime, diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.properties b/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.properties index c25660b81da..fbf074475c7 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.properties +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2007, 2019 QNX Software Systems and others +# Copyright (c) 2007, 2020 QNX Software Systems and others # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -14,6 +14,7 @@ # John Dallaway - migrate device extensions to core plugin, bug 538282 # John Dallaway - SEGGER J-Link extension, bug 548281 # John Dallaway - PEmicro extension, bug 552597 +# John Dallaway - ST-LINK extension, bug 558266 ############################################################################### launchConfig.name=GDB Hardware Debugging pluginName=Eclipse GDB Hardware Debug Core Plug-in @@ -28,6 +29,7 @@ OpenOCDPipe.name=OpenOCD (via pipe) OpenOCDSocket.name=OpenOCD (via socket) PEMicro.name=PEmicro SeggerJLink.name=SEGGER J-Link +STLink.name=ST-LINK Generic.name=Generic TCP/IP launchDelegate.jtag.name=Legacy GDB Hardware Debugging diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml b/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml index 3c2e244bf7a..faa32f1d968 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml @@ -67,5 +67,10 @@ id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.SeggerJLink" name="%SeggerJLink.name"> + + diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/STLink.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/STLink.java new file mode 100644 index 00000000000..6c9eed7aef8 --- /dev/null +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/STLink.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2008, 2020 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + * Andy Jin - Hardware debugging UI improvements, bug 229946 + * John Dallaway - ST-LINK extension, bug 558266 + *******************************************************************************/ +package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice; + +import java.util.Collection; + +/** + * @since 9.5 + */ +public class STLink extends DefaultGDBJtagDeviceImpl { + + @Override + public String getDefaultPortNumber() { + return "61234"; //$NON-NLS-1$ + } + + @Override + public void doDelay(int delay, Collection commands) { + /* not supported */ + } + + @Override + public void doHalt(Collection commands) { + /* not supported */ + } + + @Override + public void doReset(Collection commands) { + doResetAndHalt(commands); + doContinue(commands); + } + + @Override + public void doResetAndHalt(Collection commands) { + addCmd(commands, "monitor reset"); //$NON-NLS-1$ + } + +}