Added wpilib_interface and roboRIO specific code.
Change-Id: I9900f79e8557879abd20edd3f194575b0e4772ef
diff --git a/aos/build/externals.gyp b/aos/build/externals.gyp
index a097fd7..5e3a64f 100644
--- a/aos/build/externals.gyp
+++ b/aos/build/externals.gyp
@@ -19,6 +19,34 @@
},
'targets': [
{
+ 'target_name': 'WPILib_roboRIO',
+ 'type': 'static_library',
+ 'include_dirs': [
+ '/opt/wpilib_4.8.3/include',
+ ],
+ 'link_settings': {
+ 'libraries': [
+ '-L/opt/wpilib_4.8.3/lib/',
+ '-lpthread',
+ '-lFRC_NetworkCommunication',
+ '-lRoboRIO_FRC_ChipObject',
+ '-lNiFpgaLv',
+ '-lNiFpga',
+ '-lNiRioSrv',
+ '-lspi',
+ '-li2c',
+ '/opt/wpilib_4.8.3/lib/libwpilib_nonshared.a',
+ '/opt/wpilib_4.8.3/lib/libHALAthena.a',
+ '/opt/wpilib_4.8.3/lib/libNetworkTables.a',
+ ],
+ },
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '-isystem', '/opt/wpilib_4.8.3/include/',
+ ],
+ },
+ },
+ {
'target_name': 'WPILib',
'type': 'static_library',
'sources': [
diff --git a/aos/config/robotCommand b/aos/config/robotCommand
new file mode 100755
index 0000000..afc3a70
--- /dev/null
+++ b/aos/config/robotCommand
@@ -0,0 +1 @@
+/home/admin/robot_code/starter_roborio.sh /home/admin/robot_code/start_list.txt "$@"
diff --git a/aos/linux_code/starter/starter.gyp b/aos/linux_code/starter/starter.gyp
index 5d86ea4..ee8c9ab 100644
--- a/aos/linux_code/starter/starter.gyp
+++ b/aos/linux_code/starter/starter.gyp
@@ -32,9 +32,19 @@
{
'destination': '<(rsync_dir)',
'files': [
- 'starter.sh',
'starter_loop.sh',
],
+ 'conditions': [
+ ['FULL_COMPILER=="gcc_frc"', {
+ 'files': [
+ 'starter_roborio.sh',
+ ],
+ }, {
+ 'files': [
+ 'starter.sh',
+ ],
+ }
+ ]],
},
],
},
diff --git a/aos/linux_code/starter/starter_roborio.sh b/aos/linux_code/starter/starter_roborio.sh
new file mode 100755
index 0000000..d2a0ae1
--- /dev/null
+++ b/aos/linux_code/starter/starter_roborio.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+# NI already has a core pattern, so we probably shouldn't change it.
+#echo '/home/driver/tmp/robot_logs/%e-%s-%p-%t.coredump' > /proc/sys/kernel/core_pattern
+
+export PATH=$PATH:/home/admin/robot_code
+exec starter_loop.sh "$@"