1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Bug 494059: Add OpenOCD extensions

Change-Id: I0a2820f40c641a85aac11e8d72b6aca65f599b6e
Signed-off-by: John Dallaway <john@dallaway.org.uk>
This commit is contained in:
John Dallaway 2018-01-21 16:35:50 +00:00
parent 746993c9ee
commit 573af6187b
6 changed files with 84 additions and 4 deletions

View file

@ -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.1.1.qualifier
Bundle-Version: 9.2.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.core.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,

View file

@ -0,0 +1,31 @@
/*******************************************************************************
* Copyright (c) 2008, 2018 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - OpenOCD extensions, bug 494059
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
/**
* @since 9.2
*/
public class OpenOCDPipe extends DefaultGDBJtagConnectionImpl {
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagConnectionImpl#doDelay(int, java.util.Collection)
*/
@Override
public void doDelay(int delay, Collection <String>commands) {
addCmd(commands, "monitor sleep " + String.valueOf(delay * 1000)); //$NON-NLS-1$
}
}

View file

@ -0,0 +1,39 @@
/*******************************************************************************
* Copyright (c) 2008, 2018 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
* Andy Jin - Hardware debugging UI improvements, bug 229946
* John Dallaway - OpenOCD extensions, bug 494059
*******************************************************************************/
package org.eclipse.cdt.debug.gdbjtag.core.jtagdevice;
import java.util.Collection;
/**
* @since 9.2
*/
public class OpenOCDSocket extends DefaultGDBJtagDeviceImpl {
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl#getDefaultPortNumber()
*/
@Override
public String getDefaultPortNumber() {
return "3333"; //$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 <String>commands) {
addCmd(commands, "monitor sleep " + String.valueOf(delay * 1000)); //$NON-NLS-1$
}
}

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.gdbjtag.ui;singleton:=true
Bundle-Version: 8.0.1.qualifier
Bundle-Version: 8.0.2.qualifier
Bundle-Activator: org.eclipse.cdt.debug.gdbjtag.ui.Activator
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,

View file

@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2007-2010 QNX Software Systems and others.
# Copyright (c) 2007-2018 QNX Software Systems and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@ -12,6 +12,7 @@
# Bruce Griffith,Sage Electronic Engineering, LLC - bug 305943
# - API generalization to become transport-independent (e.g. to
# allow connections via serial ports and pipes).
# John Dallaway - OpenOCD extensions, bug 494059
###############################################################################
pluginName=Eclipse GDB Hardware Debug UI Plug-in
providerName=Eclipse CDT
@ -20,6 +21,7 @@ AbatronBDI2000.name=Abatron BDI2000
MacraigorUsb2Demon.name=Macraigor USB2Demon
GenericSerial.name=Generic Serial
OpenOCDPipe.name=OpenOCD (via pipe)
OpenOCDSocket.name=OpenOCD (via socket)
Generic.name=Generic TCP/IP
launchtab.cmaintab.name=Main

View file

@ -52,12 +52,20 @@
<extension
point="org.eclipse.cdt.debug.gdbjtag.core.JTagDevice">
<device
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagConnectionImpl"
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDPipe"
default_connection="| openocd --pipe"
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCD"
name="%OpenOCDPipe.name">
</device>
</extension>
<extension
point="org.eclipse.cdt.debug.gdbjtag.core.JTagDevice">
<device
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDSocket"
id="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.OpenOCDSocket"
name="%OpenOCDSocket.name">
</device>
</extension>
<extension
point="org.eclipse.debug.ui.launchConfigurationTabs">
<tab