Debian Linux Setup - uw-advanced-robotics/taproot GitHub Wiki
We strongly recommend Ubuntu 20.04 LTS. This guide should also work with other recent Debian-based distributions. Older Ubuntu versions are likely to not work due to missing modern gcc/g++.
-
Run the following commands in a terminal:
sudo apt-get install python3 python3-pip scons git openocd gcc build-essential libboost-all-dev sudo apt-get --no-install-recommends install doxygen
-
Download the latest version of the
arm-none-eabi
toolchain from here.
You want the file ending in -x86_64-linux.tar.bz2
. Extract the file with the Archive Manager GUI
or via the command line, as tar -xjf /*-x86_64-linux.tar.bz2
. Put the extracted directory
somewhere you can refer back to later.
-
Add the new compiler and tools to your PATH so they're accessible in every terminal.
Run the following command, replacing
path/to/gcc-arm-none-eabi
with your absolute path to the toolchain, e.g./home/foo/gcc-arm-none-eabi-10-2020-q4-major
. Don't forget the/bin
on the end!echo 'export PATH="path/to/gcc-arm-none-eabi/bin:$HOME/.local/bin:$PATH:$PATH"' >> ~/.bashrc source ~/.bashrc
-
Choose or create a directory to store your source code.
repos
is a good name choice:mkdir repos cd repos
-
Build and install googletest:
git clone --branch release-1.10.0 https://github.com/google/googletest.git cd googletest mkdir build cd build cmake ../ make sudo make install cd ../../
-
Download and compile the latest version of openocd (
apt-get install openocd
is insufficient).git clone https://github.com/ntfreak/openocd.git cd openocd ./bootstrap ./configure make sudo make install cd ../
-
Install the ST-Link V2 driver. This is done through the terminal. The following instructions were taken and partially modified from this site.
sudo apt-get install git make cmake libusb-1.0-0-dev sudo apt-get install gcc build-essential git clone https://github.com/texane/stlink cd stlink cmake . make sudo make install cd bin sudo cp st-* /usr/local/bin cd .. sudo cp config/udev/rules.d/49-stlinkv* /etc/udev/rules.d/ sudo udevadm control --reload cd ..
-
Download and install VSCode.
Visit the README of the repo you are working in to find next steps. You'll want to:
- Clone your repository
- Build the project and run the tests to confirm your environment is set up correctly