Skip to content

Latest commit

 

History

History
66 lines (42 loc) · 4.42 KB

setup.md

File metadata and controls

66 lines (42 loc) · 4.42 KB
  1. Package Manager - A tool to help you easily install the other tools.

    • Windows users should install MSYS2: winget install MSYS2.MSYS2.
    • MacOS users should install Homebrew.
  2. Add your package manager's bin/ directory to your environment path variable to make your tools accessible. Note that your install location may vary.

    • Windows: Add C:\msys64\usr\bin. Check this link for help with the process.
    • MacOS: Add /opt/homebrew/bin. Check this link for help with the process.
  3. 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 with brew install git.
  4. Clone this repository with the following command:

git clone https://github.com/PurdueElectricRacing/firmware.git
  1. 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)
  2. 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.
  3. 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 of pip.
  4. 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.
  5. 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.
  6. 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.
  7. Install Ninja: Small & fast build system used by CMake.

    • Windows: pacman -S mingw-w64-x86_64-ninja.
    • MacOS: brew install ninja.
  8. Install STLink Drivers Windows drivers for STM32 debugging probe.

    • Windows: pacman -S mingw-w64-x86_64-stlink.
    • MacOS, use brew install stlink.