-
Notifications
You must be signed in to change notification settings - Fork 0
Setup Guide
The setup guide contains some OS-specific steps to install all of the required dependencies, and then some general installation instructions for software that is the same for all operating systems. Make sure to scroll all the way to the bottom!
Note for reviewers: there have been a number of recent changes to the dependencies for this repository, and these new instructions have not been tested on most operating systems. Please let me know if you have any troubles so that we can make these steps as smooth as possible.
General list of required dependencies (see OS-specific instructions below).
- GCC and gcc-arm-none-eabi
- CMake
- Ninja
- Git
- Python
- OpenOCD
Installation commands for common distributions are given below. Installing on other distributions should be similar, up to differences with your package manager of choice.
Ubuntu / WSL: sudo apt update && sudo apt install build-essential gcc-arm-none-eabi cmake ninja-build git python3 python3-pip python3-venv openocd
Fedora: sudo dnf groupinstall "Development Tools" && sudo dnf install arm-none-eabi-gcc-cs cmake ninja-build git python3 python3-pip python3-venv openocd
- If you don't already have it installed, install Homebrew by following the directions here and then restart your terminal: https://brew.sh/
- Install core dependencies by running
brew install gcc cmake ninja git python3 open-ocd - Install the arm embedded toolchain by running
brew install --cask gcc-arm-embedded
The easiest way to program embedded systems on Windows is to use WSL. You can follow the instructions here to install it (the default Ubuntu distribution is fine for our use cases), and then follow along with the Linux/Ubuntu instructions above. Note that when running commands, you must run them through WSL instead of using powershell. Later, when setting up VSCode, there are also instructions on how to make WSL your default terminal, which you may find useful.
- STM32CubeMX: https://www.st.com/content/st_com/en/stm32cubemx.html?tab=installer#stm32-software-downloads-container
- STM32CubeProgrammer: https://www.st.com/en/development-tools/stm32cubeprog.html#section-get-software-table
- VSCode (other code editors are fine but may require additional steps): https://code.visualstudio.com/download?_exp_download=fb315fc982
-
Open a new terminal window, navigate to / make a folder for GNC projects, and then git clone the flight software repository with the following command:
git clone https://github.com/Georgia-Tech-GNC/flight-software.git. Open the project in VSCode -
Optional for Windows users: you can follow the instructions here to make VSCode automatically use WSL. This may make your development experience easier.
-
The most important extension is clangd, which can unfortunately be a bit of a hassle to setup. Follow these steps:
-
Install clangd from the VSCode extensions tab (the 4 blocks icon on the vertical toolbar on the left). You may get various prompts to enable/disable clangd or C intellisense, ignore them for now
-
(Only if you do not want clangd to be on for all of your vscode projects) Open the command palette using ctrl-shift-p (or cmd-shift-p on macbooks) and search for "Preferences: Open User Settings (JSON)". In the file that gets opened, add the following (or just add the lines inside the curly brackets if you already have stuff in this file):
{ "clangd.detectExtensionConflicts": false, "clangd.enable": false, "clangd.enableCodeCompletion": false, "clangd.enableHover": false }- Now add a new folder to your VSCode project named
.vscodeand create a file inside calledsettings.json. Copy the following into that file: TODO: double check this
{ "clangd.detectExtensionConflicts": true, "clangd.enable": true, "clangd.enableCodeCompletion": true, "clangd.enableHover": true }- Finally, reopen the command palette and run "clangd: Download Language Server". Once its done, you may see a large number of red squiggly errors in the code. Don't worry about these for now, as they will all go away once you compile the code for the first time.
-
-
Once you are done, you can also optionally install the following extensions: Python, Pylance, CMake