-
Package Manager - A tool to help you easily install the other tools.
-
Add your package manager's
bin/
directory to your environment path variable to make your tools accessible. Note that your install location may vary. -
Install Git: Tool for managing source code and uploading to GitHub.
- Windows:
pacman -S git
. - MacOS: this should be preinstalled for you. To double-check this, type
git --version
into your terminal. Otherwise, install withbrew install git
.
- Windows:
-
Clone this repository with the following command:
git clone https://github.com/PurdueElectricRacing/firmware.git
-
Install Visual Studio Code: Text editor with extensions for helping build the firmware components using CMake.
Important extensions:
- Cortex-Debug: Provides debugging support for ARM Cortex-M microcontrollers, including live watch capability.
- clangd: Provides advanced C/C++ code completion and analysis. (Optional)
-
Initialize the git submodules in this project with the following command to download the source for the various git submodules:
git submodule update --init --recursive
.- This command needs to be run in the base folder of the cloned repository and may take a few minutes to complete.
-
Install the required python packages with the following command:
pip install -r requirements.txt
.- Newer MacOS systems come with python3, you can try using
pip3
instead ofpip
.
- Newer MacOS systems come with python3, you can try using
-
Install arm-none-eabi-gcc: Compiler specific to ARM based targets.
- Windows:
pacman -S mingw-w64-x86_64-arm-none-eabi-gcc
. - MacOS:
brew install --cask gcc-arm-embedded
.
- Windows:
-
Install OpenOCD v0.11.0-3: Open Source On-Chip Debugger used to help GDB debug your code on a STM32 processor.
- Windows:
pacman -S mingw-w64-x86_64-openocd
.
- MacOS:
brew install openocd
.
- Windows:
-
Install CMake: Build system generator. This takes care of making all of the build files needed to compile the project.
- Windows:
pacman -S mingw-w64-x86_64-cmake
. - MacOS:
brew install cmake
.
- Windows:
-
Install Ninja: Small & fast build system used by CMake.
- Windows:
pacman -S mingw-w64-x86_64-ninja
. - MacOS:
brew install ninja
.
- Windows:
-
Install STLink Drivers Windows drivers for STM32 debugging probe.
- Windows:
pacman -S mingw-w64-x86_64-stlink
. - MacOS, use
brew install stlink
.
- Windows: