Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Because the stm32 chips we use contain an ARM processor and our own computers are x86_64, we need special compilers (cross compilers) to convert our C/C++ code into instructions that the MCUs can understand. This toolchain consists of a compiler that runs on x86_64 but builds ARM code, as well as a linker, debugger (gdb), assembler and other tools that we use to build the project. For your own curiosity, our build system is rigged to pull in an assembly startup file, provided by ST, which allows the toolchain to figure out all the ST specific stuff relative to building. Feel free to ask someone on the team more about that if you're interested.

Installation

Download the GNU ARM Embedded Toolchain for whatever operating system you're using. Note that you may also be able to install it with “sudo apt-get install gcc-arm-none-eabi binutils-arm-none-eabi gdb-arm-none-eabi” from the command line on linux/WSL.

Building

Once you’ve installed the toolchain, you should be ready to build. To do so, cd into ZeroPilot-SW/Autopilot or ZeroPilot-SW/Safety, depending on which you want to build, and run

Code Block
./Tools/build.bash

Note that you may append the “-c” option to that to clean the build, which may be required every once in a while.