From bce75b4595d9fad0bb5207b966d9afc1e9f1c284 Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Fri, 14 Jun 2019 15:01:51 +0100 Subject: Bug 548281: Add SEGGER J-Link definitions Change-Id: If832ddcfcdb4cadd629afe6c9e1ca48528a17d54 Signed-off-by: John Dallaway --- .../META-INF/MANIFEST.MF | 2 +- .../plugin.properties | 4 +- jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml | 8 ++++ .../debug/gdbjtag/core/jtagdevice/SeggerJLink.java | 50 ++++++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/SeggerJLink.java (limited to 'jtag') 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 54fd49eca30..4bacd774371 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.2.100.qualifier +Bundle-Version: 9.3.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 6154171ee50..47099c2d51a 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, 2018 QNX Software Systems and others +# Copyright (c) 2007, 2019 QNX Software Systems and others # # This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -12,6 +12,7 @@ # QNX Software Systems - initial API and implementation # IBM Corporation # John Dallaway - migrate device extensions to core plugin, bug 538282 +# John Dallaway - SEGGER J-Link extension, bug 548281 ############################################################################### launchConfig.name=GDB Hardware Debugging pluginName=Eclipse GDB Hardware Debug Core Plug-in @@ -24,6 +25,7 @@ MacraigorUsb2Demon.name=Macraigor USB2Demon GenericSerial.name=Generic Serial OpenOCDPipe.name=OpenOCD (via pipe) OpenOCDSocket.name=OpenOCD (via socket) +SeggerJLink.name=SEGGER J-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 7bbff7dba69..1d18dfd6003 100644 --- a/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/plugin.xml @@ -73,4 +73,12 @@ name="%OpenOCDSocket.name"> + + + + diff --git a/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/SeggerJLink.java b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/SeggerJLink.java new file mode 100644 index 00000000000..1441305294e --- /dev/null +++ b/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/jtagdevice/SeggerJLink.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2008, 2019 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 - SEGGER J-Link extension, bug 548281 + *******************************************************************************/ +package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice; + +import java.util.Collection; + +/** + * @since 9.3 + */ +public class SeggerJLink extends DefaultGDBJtagDeviceImpl { + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl#getDefaultPortNumber() + */ + @Override + public String getDefaultPortNumber() { + return "2331"; //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl#doDelay(int, java.util.Collection) + */ + @Override + public void doDelay(int delay, Collection commands) { + addCmd(commands, "monitor sleep " + String.valueOf(delay * 1000)); //$NON-NLS-1$ + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl#doReset(java.util.Collection) + */ + @Override + public void doReset(Collection commands) { + addCmd(commands, "monitor reset"); //$NON-NLS-1$ + addCmd(commands, "monitor go"); //$NON-NLS-1$ + } + +} -- cgit v1.2.3