Kill program before debugging C++ so file upload doesn't fail

Change-Id: Ibd4fdb6cbf491f20d66f36c4fb84753a1abbfd1e
This commit is contained in:
Kevin O'Connor
2014-08-21 17:18:59 -04:00
parent f9ab84d912
commit 7638e2b6e5
2 changed files with 13 additions and 0 deletions

View File

@@ -111,6 +111,11 @@ public class DeployLaunchShortcut implements ILaunchShortcut
// Debug deploys are done with the Eclipse Remote System Explorer,
// which lets it work with Eclipse's C++ debugger.
// Kill running program before using RSE as RSE can't
WPILibCPPPlugin.logInfo("Running ant file: " + activeProj.getLocation().toOSString() + File.separator + "build.xml");
WPILibCPPPlugin.logInfo("Targets: kill-program, Mode: " + mode);
AntLauncher.runAntFile(new File (activeProj.getLocation().toOSString() + File.separator + "build.xml"), "kill-program", null, mode);
// TODO: figure out UI issues. that's why this is undocumented
ILaunchConfigurationWorkingCopy config;
try {

View File

@@ -48,6 +48,14 @@
trust="true"
command="tail -F -s 0 -n 0 ${deploy.log.file}"/>
</target>
<target name="kill-program" depends="get-target-ip" description="Kill the currently running FRC program">
<sshexec host="${target}"
username="${username}"
password="${password}"
trust="true"
command="/usr/local/frc/bin/frcKillRobot.sh"/>
</target>
<target name="debug-deploy" depends="get-target-ip" description="Deploy the jar and start the program running in debug mode.">
<echo>[athena-deploy] Killing running program</echo>