changeset 61:afc593f7469e newapi

Add ability to connect to a running BeagleRT project using screen
author andrewm
date Wed, 15 Jul 2015 19:09:18 +0100
parents ad6b2767beaf
children a11e23f4e6af
files scripts/build_project.sh scripts/connect_to_project.sh scripts/run_project.sh
diffstat 3 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/build_project.sh	Wed Jul 15 18:53:10 2015 +0100
+++ b/scripts/build_project.sh	Wed Jul 15 19:09:18 2015 +0100
@@ -77,5 +77,5 @@
     ssh $BBB_ADDRESS "make all -C $BBB_PATH"
 else
     echo "Building and running project..."
-    ssh $BBB_ADDRESS "make all -C $BBB_PATH ; screen -d -m $BBB_PATH/BeagleRT $COMMAND_ARGS"
+    ssh $BBB_ADDRESS "make all -C $BBB_PATH ; screen -S BeagleRT -d -m $BBB_PATH/BeagleRT $COMMAND_ARGS"
 fi
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/connect_to_project.sh	Wed Jul 15 19:09:18 2015 +0100
@@ -0,0 +1,8 @@
+#!/bin/bash
+#
+# This script brings an already running BeagleRT program to the foreground 
+# in the terminal, so it can be run interactively.
+
+BBB_ADDRESS="root@192.168.7.2"
+
+ssh -t $BBB_ADDRESS "screen -S BeagleRT -r"
\ No newline at end of file
--- a/scripts/run_project.sh	Wed Jul 15 18:53:10 2015 +0100
+++ b/scripts/run_project.sh	Wed Jul 15 19:09:18 2015 +0100
@@ -35,4 +35,4 @@
 shift $((OPTIND-1))
 
 echo "Running BeagleRT..."
-ssh $BBB_ADDRESS "kill -s 2 \`pidof BeagleRT\` 2>/dev/null ; sleep 0.5 ; screen -d -m $BBB_PATH/BeagleRT $COMMAND_ARGS"
\ No newline at end of file
+ssh $BBB_ADDRESS "kill -s 2 \`pidof BeagleRT\` 2>/dev/null ; sleep 0.5 ; screen -S BeagleRT -d -m $BBB_PATH/BeagleRT $COMMAND_ARGS"
\ No newline at end of file