mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Reverting back to static .a files for C++ and fixing lots of other assorted items
This commit is contained in:
@@ -24,7 +24,8 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.cdt.debug.core;bundle-version="7.2.0",
|
||||
org.eclipse.cdt.debug.ui;bundle-version="7.2.0",
|
||||
org.eclipse.cdt.launch;bundle-version="7.1.0",
|
||||
org.eclipse.cdt.launch.remote;bundle-version="2.4.0"
|
||||
org.eclipse.cdt.launch.remote;bundle-version="2.4.0",
|
||||
org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Export-Package: edu.wpi.first.wpilib.plugins.cpp,
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
description="Deploy the WPILib project to the athena board."
|
||||
icon="resources/icons/wpi.ico"
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.launching.deploy"
|
||||
label="WPILib Deploy"
|
||||
label="WPILib Deploy Configure Builder"
|
||||
modes="run,debug">
|
||||
<contextualLaunch>
|
||||
<enablement>
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
@@ -34,15 +34,31 @@
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1367166630" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1568604896" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.1928585110" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="$cpp-location/lib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1072058280" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="WPILibAthena"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<option id="gnu.cpp.link.option.paths.1928585110" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="$cpp-location/lib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1072058280" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="WPILibAthena"/>
|
||||
<listOptionValue builtIn="false" value="HALAthena"/>
|
||||
<listOptionValue builtIn="false" value="NetworkTables"/>
|
||||
<listOptionValue builtIn="false" value="FRC_FPGA_ChipObject"/>
|
||||
<listOptionValue builtIn="false" value="FRC_NetworkCommunication"/>
|
||||
<listOptionValue builtIn="false" value="i2c"/>
|
||||
<listOptionValue builtIn="false" value="ni_emb"/>
|
||||
<listOptionValue builtIn="false" value="NiFpgaLv"/>
|
||||
<listOptionValue builtIn="false" value="NiFpga"/>
|
||||
<listOptionValue builtIn="false" value="nirio_emb_can"/>
|
||||
<listOptionValue builtIn="false" value="NiRioSrv"/>
|
||||
<listOptionValue builtIn="false" value="ni_rtlog"/>
|
||||
<listOptionValue builtIn="false" value="RoboRIO_FRC_ChipObject"/>
|
||||
<listOptionValue builtIn="false" value="spi"/>
|
||||
<listOptionValue builtIn="false" value="visa"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.flags.1747959472" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,$cpp-location/lib" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.other.1891020896" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" valueType="stringList">
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.flags.1747959472" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,$cpp-location/lib" valueType="string"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1757265359" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
@@ -66,12 +82,12 @@
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
|
||||
@@ -2,25 +2,42 @@ package edu.wpi.first.wpilib.plugins.cpp.launching;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.debug.core.executables.Executable;
|
||||
import org.eclipse.cdt.debug.core.executables.ExecutablesManager;
|
||||
import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.debug.mi.core.IMIConstants;
|
||||
import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.launch.remote.IRemoteConnectionConfigurationConstants;
|
||||
import org.eclipse.cdt.launch.remote.IRemoteConnectionHostConstants;
|
||||
import org.eclipse.cdt.ui.ICDTConstants;
|
||||
import org.eclipse.core.internal.resources.Resource;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.debug.core.DebugException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
import org.eclipse.debug.core.ILaunch;
|
||||
import org.eclipse.debug.core.ILaunchConfigurationType;
|
||||
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||
import org.eclipse.debug.core.ILaunchManager;
|
||||
import org.eclipse.debug.internal.ui.launchConfigurations.LaunchHistory;
|
||||
import org.eclipse.debug.ui.DebugUITools;
|
||||
import org.eclipse.debug.ui.IDebugUIConstants;
|
||||
import org.eclipse.debug.ui.ILaunchGroup;
|
||||
import org.eclipse.debug.ui.ILaunchShortcut;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.StructuredSelection;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IEditorPart;
|
||||
import org.eclipse.ui.IFileEditorInput;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
@@ -38,147 +55,118 @@ import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
* @author Alex Henning
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class DeployLaunchShortcut implements ILaunchShortcut {
|
||||
//Class constants - used to delineate types for launch shortcuts
|
||||
public class DeployLaunchShortcut implements ILaunchShortcut
|
||||
{
|
||||
// Class constants - used to delineate types for launch shortcuts
|
||||
public static final String DEPLOY_TYPE = "edu.wpi.first.wpilib.plugins.core.deploy";
|
||||
private static final String ANT_SERVER_THREAD_NAME = "Ant Build Server Connection";
|
||||
|
||||
private static ILaunch lastDeploy = null;
|
||||
|
||||
/**
|
||||
* Returns the launch type of the shortcut that was used, one of the constants
|
||||
* defined in BaseLaunchShortcut
|
||||
* Returns the launch type of the shortcut that was used, one of the
|
||||
* constants defined in BaseLaunchShortcut
|
||||
*
|
||||
* @return Launch shortcut type
|
||||
*/
|
||||
public String getLaunchType() {return DEPLOY_TYPE;}
|
||||
public String getLaunchType()
|
||||
{
|
||||
return DEPLOY_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void launch(ISelection selection, String mode) {
|
||||
//Extract resource from selection
|
||||
StructuredSelection sel = (StructuredSelection)selection;
|
||||
public void launch(ISelection selection, String mode)
|
||||
{
|
||||
// Extract resource from selection
|
||||
StructuredSelection sel = (StructuredSelection) selection;
|
||||
IProject activeProject = null;
|
||||
if (sel.getFirstElement() instanceof IProject) {
|
||||
if (sel.getFirstElement() instanceof IProject)
|
||||
{
|
||||
activeProject = (IProject) sel.getFirstElement();
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Run config using project found in extracted resource, with indicated mode
|
||||
runConfig(activeProject, mode);
|
||||
|
||||
// Run config using project found in extracted resource, with indicated
|
||||
// mode
|
||||
runConfig(activeProject, mode, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void launch(IEditorPart editor, String mode) {
|
||||
//Extract resource from editor
|
||||
if(editor != null){
|
||||
IFileEditorInput input = (IFileEditorInput)editor.getEditorInput();
|
||||
IFile file = input.getFile();
|
||||
IProject activeProject = file.getProject();
|
||||
|
||||
//If editor existed, run config using extracted resource in indicated mode
|
||||
runConfig(activeProject, mode);
|
||||
}else{
|
||||
public void launch(IEditorPart editor, String mode)
|
||||
{
|
||||
// Extract resource from editor
|
||||
if (editor != null)
|
||||
{
|
||||
IFileEditorInput input = (IFileEditorInput) editor.getEditorInput();
|
||||
IFile file = input.getFile();
|
||||
IProject activeProject = file.getProject();
|
||||
|
||||
// If editor existed, run config using extracted resource in
|
||||
// indicated mode
|
||||
runConfig(activeProject, mode, editor.getSite().getWorkbenchWindow().getShell());
|
||||
} else
|
||||
{
|
||||
System.err.println("editor was null");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the ant script using the correct target for the indicated mode (deploy to cRIO or just compile)
|
||||
* @param activeProj The project that the script will be run on/from
|
||||
* @param mode The mode it will be run in (ILaunchManager.RUN_MODE or ILaunchManager.DEBUG_MODE)
|
||||
*
|
||||
* @param activeProj
|
||||
* The project that the script will be run on/from
|
||||
* @param mode
|
||||
* The mode it will be run in (ILaunchManager.RUN_MODE or
|
||||
* ILaunchManager.DEBUG_MODE)
|
||||
*/
|
||||
public void runConfig(IProject activeProj, String mode){
|
||||
String targets = "deploy";
|
||||
|
||||
if(mode.equals(ILaunchManager.RUN_MODE)){
|
||||
if(getLaunchType().equals(DEPLOY_TYPE)){
|
||||
targets = "deploy";
|
||||
}
|
||||
} else if ((mode.equals(ILaunchManager.DEBUG_MODE))&&(getLaunchType().equals(DEPLOY_TYPE))) {
|
||||
targets = "debug-deploy";
|
||||
try{
|
||||
PlatformUI.getWorkbench().showPerspective(IDebugUIConstants.ID_DEBUG_PERSPECTIVE,
|
||||
PlatformUI.getWorkbench().getActiveWorkbenchWindow());
|
||||
|
||||
}catch(Exception e){}
|
||||
public void runConfig(IProject activeProj, String mode, Shell shell) //TODO: figure out UI issues. tjats why this is undocumented""
|
||||
{
|
||||
ILaunchConfigurationWorkingCopy config;
|
||||
try
|
||||
{
|
||||
config = getRemoteDebugConfig(activeProj);
|
||||
//config.doSave(); // NOTE: For debugging
|
||||
//org.eclipse.debug.core.DebugPlugin.getDefault().getLaunchManager().addLaunch(config.launch(mode, null));
|
||||
//THIS IS MADDENING! we want to add to the recent history, but I can't seem to find a public api to do so, so lets just launch the config dialog
|
||||
//DebugUITools.openLaunchConfigurationPropertiesDialog(shell, config, "org.eclipse.cdt.launch.launchGroup");
|
||||
//config.launch(mode, new NullProgressMonitor(), false, true);
|
||||
DebugUITools.launch(config, mode);
|
||||
} catch (CoreException e)
|
||||
{
|
||||
System.err.println("Debug attach failed.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
if((lastDeploy != null)&&(!lastDeploy.isTerminated())){
|
||||
System.out.println("Last deploy running");
|
||||
//Find the server connection thread and kill it
|
||||
Vector<ThreadGroup> threadGroups = new Vector<ThreadGroup>();
|
||||
ThreadGroup root = Thread.currentThread().getThreadGroup().getParent();
|
||||
while (root.getParent() != null) {root = root.getParent();}
|
||||
threadGroups.add(root);
|
||||
ThreadGroup threadGroup = threadGroups.remove(0);
|
||||
int numThreads = threadGroup.activeCount();
|
||||
Thread[] threads = new Thread[numThreads*100];
|
||||
numThreads = threadGroup.enumerate(threads, true);
|
||||
|
||||
for(Thread current: threads){
|
||||
if(current != null){
|
||||
if(current.getName().equals(ANT_SERVER_THREAD_NAME)){
|
||||
try{
|
||||
//Manually end thread and then try terminating launch
|
||||
Method stopMethod = current.getClass().getMethod("stop");
|
||||
stopMethod.invoke(current);
|
||||
lastDeploy.terminate();
|
||||
break;
|
||||
}catch(Exception e){e.printStackTrace();}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("Waiting");
|
||||
try{wait(1000);}catch(Exception e){}
|
||||
|
||||
}
|
||||
|
||||
if (mode.equals(ILaunchManager.RUN_MODE)) {
|
||||
System.out.println("Running ant file: " + activeProj.getLocation().toOSString() + File.separator + "build.xml");
|
||||
System.out.println("Targets: " + targets + ", Mode: " + mode);
|
||||
lastDeploy = AntLauncher.runAntFile(new File (activeProj.getLocation().toOSString() + File.separator + "build.xml"), targets, null, mode);
|
||||
} else if((mode.equals(ILaunchManager.DEBUG_MODE))&&(getLaunchType().equals(DEPLOY_TYPE))) {
|
||||
ILaunchConfigurationWorkingCopy config;
|
||||
try {
|
||||
config = getRemoteDebugConfig(activeProj);
|
||||
//config.doSave(); // NOTE: For debugging
|
||||
startDebugConfig(config, lastDeploy);
|
||||
} catch (CoreException e) {
|
||||
System.err.println("Debug attach failed.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
activeProj.refreshLocal(Resource.DEPTH_INFINITE, null);
|
||||
} catch (Exception e) {}
|
||||
} catch (Exception e)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private ILaunchConfigurationWorkingCopy getRemoteDebugConfig(IProject activeProj) throws CoreException {
|
||||
private ILaunchConfigurationWorkingCopy getRemoteDebugConfig(IProject activeProj) throws CoreException
|
||||
{
|
||||
ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager();
|
||||
ILaunchConfigurationType type = manager.getLaunchConfigurationType(ICDTLaunchConfigurationConstants.ID_LAUNCH_C_REMOTE_APP);
|
||||
int teamNumber = WPILibCore.getDefault().getTeamNumber(activeProj);
|
||||
String remote_connection = RSEUtils.getTarget(teamNumber).getName();
|
||||
|
||||
ILaunchConfigurationWorkingCopy config = type.newInstance(null, "Debug "+activeProj.getName());
|
||||
|
||||
ILaunchConfigurationWorkingCopy config = type.newInstance(null, activeProj.getName());
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, activeProj.getName());
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME, "Debug/FRCUserProgram");
|
||||
config.setAttribute(DebugPlugin.getUniqueIdentifier() + ".ATTR_TARGET_PATH", "/home/admin/FRCUserProgram");
|
||||
config.setAttribute("org.eclipse.cdt.debug.mi.core.DEBUG_NAME", WPILibCPPPlugin.getDefault().getToolchain()+"/bin/arm-none-linux-gnueabi-gdb");
|
||||
config.setAttribute("org.eclipse.cdt.dsf.gdb.DEBUG_NAME", WPILibCPPPlugin.getDefault().getToolchain()+"/bin/arm-none-linux-gnueabi-gdb");
|
||||
Collection<Executable> exes = ExecutablesManager.getExecutablesManager().getExecutablesForProject(activeProj);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
|
||||
exes.size() > 0 ? exes.toArray(new Executable[0])[0].getPath().makeRelativeTo(activeProj.getLocation()).toString():
|
||||
"Debug/FRCUserProgram");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH, "/home/admin/FRCUserProgram");
|
||||
config.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, WPILibCPPPlugin.getDefault().getToolchain() + "/bin/arm-none-linux-gnueabi-gdb");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION, remote_connection);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "org.eclipse.rse.remotecdt.RemoteGDBDebugger");
|
||||
Map<String, String> launchers = new HashMap<String, String>();
|
||||
launchers.put("[debug]", "org.eclipse.rse.remotecdt.launch");
|
||||
config.setAttribute(DebugPlugin.getUniqueIdentifier() + ".preferred_launchers", launchers);
|
||||
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "gdbserver");
|
||||
List<String> solibs = new ArrayList<>();
|
||||
solibs.add(WPILibCPPPlugin.getDefault().getToolchain() + "/arm-non-linux-gnueabi/libc/lib");
|
||||
solibs.add(WPILibCPPPlugin.getDefault().getToolchain() + "/arm-non-linux-gnueabi/libc/usr/lib");
|
||||
solibs.add(WPILibCPPPlugin.getDefault().getCPPDir() + "/lib");
|
||||
config.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, solibs);
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
private void startDebugConfig(final ILaunchConfigurationWorkingCopy config, ILaunch deploy) throws CoreException {
|
||||
config.launch(ILaunchManager.DEBUG_MODE, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@ package edu.wpi.first.wpilib.plugins.cpp.launching;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
import org.eclipse.debug.core.ILaunchConfigurationType;
|
||||
import org.eclipse.rse.core.IRSESystemType;
|
||||
import org.eclipse.rse.core.PasswordPersistenceManager;
|
||||
import org.eclipse.rse.core.RSECorePlugin;
|
||||
@@ -15,7 +18,7 @@ public class RSEUtils {
|
||||
public static IHost getTarget(int teamNumber) {
|
||||
// The ip address based on the team number
|
||||
String hostName = "10."+(teamNumber/100)+"."+(teamNumber%100)+".2";
|
||||
String connectionName = "Team "+teamNumber;
|
||||
String connectionName = hostName; //"Team "+teamNumber;
|
||||
|
||||
// get the singleton RSE registry
|
||||
try {
|
||||
@@ -42,7 +45,7 @@ public class RSEUtils {
|
||||
"The remote target for debugging the robot for team "+teamNumber+".");
|
||||
host.setDefaultUserId("admin");
|
||||
SystemSignonInformation info = new SystemSignonInformation(hostName, "admin",
|
||||
"XX", systemType);
|
||||
"", systemType);
|
||||
PasswordPersistenceManager.getInstance().add(info, true, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -30,14 +30,13 @@
|
||||
</target>
|
||||
|
||||
<target name="deploy" depends="get-target-ip" description="Deploy the progam and start it running.">
|
||||
<echo>[athena-deploy] Killing running program</echo>
|
||||
<sshexec host="${target}"
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="killall FRCUserProgram; sleep 1"/>
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="rm ${deploy.dir}/FRCUserProgram" />
|
||||
<echo>[athena-deploy] Copying code over.</echo>
|
||||
<scp file="${out.exe}" todir="${username}@${target}:${deploy.dir}"
|
||||
<scp file="${out.exe}" sftp="true" todir="${username}@${target}:${deploy.dir}"
|
||||
password="${password}" trust="true"/>
|
||||
<sshexec host="${target}"
|
||||
username="${username}"
|
||||
@@ -119,14 +118,12 @@ ${md5.hal} usr/local/frc/lib/libHALAthena.so</echo>
|
||||
command="opkg install /tmp/${opkg.name}_${cpp-sos}_${opkg.arch}.deb; sh -c 'rm -rf /tmp/wpilib*.deb'"/>
|
||||
</else>
|
||||
</if>
|
||||
<scp file="${wpilib.ant.dir}/runcppprogram" todir="${username}@${target}:${deploy.dir}"
|
||||
password="${password}" trust="true"/>
|
||||
<echo>[athena-deploy] Starting program.</echo>
|
||||
<sshexec host="${target}"
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="chmod a+x run*program; ${deploy.run.command}"/>
|
||||
command="chmod +x ${deploy.dir}/FRCUserProgram; ${deploy.dir}/FRCUserProgram"/>
|
||||
</target>
|
||||
|
||||
<target name="debug-deploy" depends="get-target-ip" description="Deploy the jar and start the program running in debug mode.">
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#. ./.profile
|
||||
killall java
|
||||
sleep 1
|
||||
nohup java -Djna.library.path=$LD_LIBRARY_PATH -Xmx32M -agentlib:jdwp=transport=dt_socket,address=8348,server=y,suspend=y -jar FRCUserProgram.jar edu.wpi.first.wpilibj.unittests.RunTests
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
#. ./.profile
|
||||
killall java
|
||||
killall FRCUserProgram
|
||||
sleep 1
|
||||
chmod +x ./FRCUserProgram
|
||||
./FRCUserProgram
|
||||
@@ -1,6 +0,0 @@
|
||||
#. ./.profile
|
||||
killall java
|
||||
killall FRCUserProgram
|
||||
sleep 1
|
||||
nohup /usr/local/frc/JRE/bin/java -jar FRCUserProgram.jar
|
||||
#nohup /usr/local/frc/JRE/bin/java -Djna.library.path=$LD_LIBRARY_PATH -Xmx32M -jar FRCUserProgram.jar
|
||||
Reference in New Issue
Block a user