commit | 7bda621de4eaf2f9ab670d1ffaed5e374f5d872c | [log] [tgz] |
---|---|---|
author | Brian Silverman <bsilver16384@gmail.com> | Sun Aug 05 11:42:11 2018 -0700 |
committer | Brian Silverman <bsilver16384@gmail.com> | Sun Aug 05 16:01:03 2018 -0700 |
tree | b2a167e9dcb962743c0f7ceb3f56aa08cd494bcc | |
parent | 9b1790e358de81b8d3e893c38bb868131eb04184 [diff] |
Download patch instead of requiring it to be installed Part of work to make the code build on a clean Stretch machine. Change-Id: I1f7b9b51a84a98bc178b05e575ae4b314cf69c1c
This is FRC Team 971's main code repository. There are README*
files throughout the source tree documenting specifics for their respective folders.
The main central location for our code is our Gerrit server at https://robotics.mvla.net/gerrit. To get a copy of the code on your computer to work with, follow these steps:
clone with commit-msg hook
command will save you trouble later.To learn more about git, see git(1) (man git
or git(1) (especially the NOTES section).
We want all code to at least have a second person look over it before it gets merged into the master
branch. Gerrit has extensive documentation on starting reviews. TL;DR: git push origin HEAD:refs/for/master
and then click on the link to add reviewers. If you just upload a change without adding any reviewers, it might sit around for a long time before anybody else notices it. git-review can make the upload process simpler.
The currently supported operating system for building the code is amd64 Debian Jessie. It is likely to work on any x86_64 GNU/Linux system, but that's not at all well-tested.
We use Bazel to build the code. Bazel has extensive docs and does a nice job with fast, correct increment rebuilds.
/etc/apt/sources.list.d/
.apt-get install -t jessie-backports openjdk-8-jdk apt-get install python libpython-dev bazel ruby clang-format-3.5 clang-3.6 gfortran libblas-dev liblapack-dev python-scipy python-matplotlib
doc/frc971.conf
.bazel test //... bazel build --cpu=roborio //...
bazel build --cpu=roborio --compilation_mode=opt //y2018/...
# First add a host entry in your ~/.ssh/known_hosts file for the roboRIO. # Do this by ssh'ing into the machine. If you problems doing this, see # the notes below for more information on how to connect to the roboRIO. ssh admin@roboRIO-971-frc.local # If you see an error like: # subprocess.CalledProcessError: Command '['rsync' ... # ERROR: Non-zero return code '1' from command: Process exited with status 1 # The above "ssh admin@roboRIO-971-frc.local" step has not been sucessfully completed. # If the roboRIO has been configued to use a static IP address like 10.9.71.2, # set the laptop to have an IP address on the 10.9.71.x subnet with a netmask # of 255.0.0.0. The ".x" is different than the .2 for the roboRIO or any other # device on the network. The driver station uses .5 or .6 so avoid those. # The radio uses .1 or .50 so avoid those too. If you are at the school, # disconnect from the student wireless network or try setting your netmask to # 255.255.255.0 if you want to be on both networks. The student wireless # network is on a 10.?.?.? subnet which can cause problems with connecting to # the robot. bazel run --cpu=roborio --compilation_mode=opt //y2018:download -- admin@roboRIO-971-frc.local # If this does not work, try bazel run --cpu=roborio --compilation_mode=opt //y2018:download -- admin@10.9.71.2 # If this does not work, it probably means that the robot and laptop are on # different subnets. They need to be on the same subnet for the laptop to # connect to the robot. Connecting can be confirmed by using ping. ping roboRIO-971-frc.local # or ping 10.9.71.2 # If this does not work, perhaps the roboRIO has not been configured to have # a static IP address. Use a USB cable to connect from a Windows laptop to # the roboRIO and use Internet Explorer (IE) to configure the roboRIO # to have a static IP address of 10.9.71.2. Inside IE, browse to # http://roborio-971-frc.local or http://172.22.11.2. Click on the "Ethernet" # icon on the left, select "Static" for the "Configure IPv4 Address" option. # Set the "IPv4 Address" to 10.9.71.2. Set the "Subnet Mask" to "255.0.0.0". # Finally click on "Save" at the bottom of the screen. If you have trouble # using an Ethernet cable, try using a USB cable. USB cables are much # more reliable for connecting than using a Ethernet cabe. USB cables work # for connecting to the robot on Windows and Linux computers. # Another option is to configure the laptop to have a link-local connection # by going using the "Network Settings" GUI. The laptop will then be on the # same subnet in the address range of 169.254.0.0 to 169.254.255.255. # James thinks this will only work over Ethernet (i.e., not USB; he is not # sure what will happen if you attempt this over USB), and if the robot # does *not* have a static IP address set and there is no DHCP server # assigning an IP address to the roboRIO. James says to also note that this # implies that the roboRIO will also have a 169.254.*.* IP addresss, and # that the only simple way to figure it out is to use mDNS. #
# Freshly imaged roboRIOs need to be configured to run the 971 code # at startup. This is done by using the setup_roborio.sh script. setup_roborio.sh roboRIO-971-frc.local
apt-get update apt-get install git subversion ruby python vim-gtk3 subversion-tools apt-get install vim-doc git-doc git-gui git-svn exim4-doc-html ruby apt-get install python python-scipy python-matplotlib libpython-dev apt-get install bazel clang-format-3.8 clang-3.8 openjdk-8-jdk apt-get install gfortran libblas-dev liblapack-dev avahi-daemon
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - apt-get update
apt-get install apt-file apt-file update
apt-get install sysstat
iostat -dx 1
apt-get install gitg
sed -i -e 's/clang-format-3.5/clang-format-3.8/' aos/build/queues/compiler.rb
diff --git a/aos/build/queues/compiler.rb b/aos/build/queues/compiler.rb index 51646702..6a273ae9 100644 --- a/aos/build/queues/compiler.rb +++ b/aos/build/queues/compiler.rb @@ -77,7 +77,7 @@ def parse_args(globals,args) end def format_pipeline(output) read_in, write_in = IO.pipe()
sed -e 's?clang/3.6.2?clang/3.8.1?'
-e 's/clang-3.6/clang-3.8/'
-e 's/clang_3.6/clang_3.8/'
-e 's/llvm-3.6/llvm-3.8/'
-e 's?clang/3.6?clang/3.8?'
-i tools/cpp/CROSSTOOL
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL index d4e7fbb1..caa2f633 100644 --- a/tools/cpp/CROSSTOOL +++ b/tools/cpp/CROSSTOOL @@ -83,7 +83,7 @@ toolchain { tool_path { name: "compat-ld" path: "/usr/bin/ld" } tool_path { name: "cpp" path: "/usr/bin/cpp" } tool_path { name: "dwp" path: "/usr/bin/dwp" }
@@ -104,10 +104,10 @@ toolchain { cxx_builtin_include_directory: '/usr/include/x86_64-linux-gnu/c++/4.9' cxx_builtin_include_directory: '/usr/include/c++/4.9/backward' cxx_builtin_include_directory: '/usr/local/include'
cxx_builtin_include_directory: '/usr/lib/clang/3.8.1/include'
linker_flag: "-lstdc++" linker_flag: "-B/usr/bin/" @@ -535,7 +535,7 @@ toolchain { }
toolchain {
abi_version: "clang_3.8" abi_libc_version: "glibc_2.19" builtin_sysroot: "" compiler: "clang" @@ -578,7 +578,7 @@ toolchain {
compiler_flag: "-nostdinc" compiler_flag: "-isystem"
cxx_builtin_include_directory: '/usr/lib/clang/3.8/include'
linker_flag: "-target" linker_flag: "armv7a-arm-linux-gnueabif"
wget http://ftp.us.debian.org/debian/pool/main/i/isl/libisl10_0.12.2-2_amd64.deb dpkg -i libisl10_0.12.2-2_amd64.deb
time bazel build --cpu=roborio --compilation_mode=opt //y2018:download