Versions Compared

Key

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


More about Flashing:

Flashing is the process by which your computer communicates to an external programmer over USB, and flashes the target MCU with the binary you generated using the toolchain. The external programmers are called STLink progammers, and are designated by several version numbers. The ones we have in the bay are either STLinkV2 or STLink V2.1 programmers, and look like this:

...

You don't need both! Either Open-OCD or ST-Link will do

Installation (Windows)

  1. Install GNU Windows build tools

    - so you have make on your system

  2. Install the rest of the tools above, following the web page instructions

...

When installing CMake, make sure you tick the checkbox that asks if you wanna add it to you PATH

Installation (macOS)

  1. Open up a terminal window

  2. Install homebrew

  3. Run.    brew install git arm-gcc-bin cmake open-ocd

  4. If you're installing Clion, installing CMake is optional in the above command ^^. Also make sure to install version 2018.3, and not the latest version!

Building

  1. Clone the repo with: `git clone https://github.com/UWARG/ZeroPilot-SW `

  2. If you have CMake locally installed and in your path, cd into ZeroPilot-SW/AutoPilot (or into ZeroPilot-SW/Safety if your'e developing for the safety chip) and run the build script with: ./Tools/build.bash. This will generate a .elf and .bin file inside the build/ folder that you can use for flashing.

Building with CLion

  • Once CLion is downloaded, open up either the Autopilot or Safety project. Make sure your version is 2018.3 and not the latest once, as a critical plugin isn't supported by the latest version

  • You should be prompted to install the OpenOCD + STM32CubeMX plugin. If not, go to Settings->Editor→Plugins and install it:

...

Most of the time you'll wanna select the STLINKV2 configuration, since we have very few programmers that are STLINKV2.1. Click the play button to flash the chip, or the bug button to debug it!


Install instructions for flasher/debugger (only for windows atm):

Install the st-link drivers mentioned above

...