Versions Compared

Key

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

Updated:

Table of Contents

Installation

MacOS / Linux

  1. Clone repo

  2. Install docker

  3. Open a terminal in the repo directory

  4. Build sample STM dockerfile: sudo docker build -f ./Dockerfile -t ner-gcc-arm .

    1. Note that you only have to do this once really or if the environment was updated, not every time you want to develop

  5. Start sample STM dockerfile: sudo docker run --rm -it --privileged -v "$PWD:/home/app" ner-gcc-arm:latest bash

Windows

Installation of this environment is a bit more annoying in Windows smh

  1. Clone repo

  2. Install docker

  3. If Windows, update

    Update wsl2 stuff https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package

    If Windows, TODO enable USB/IP for WSL2 kernel

    and install a distro (do Ubuntu, makes it much easier)

  4. Open a Windows terminal and run winget install usbipd

  5. Open a WSL terminal and run sudo apt install linux-tools-virtual hwdata and sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 2

  6. Open a terminal in the repo directory

  7. Build sample STM dockerfile :

    Windows:

    with docker build -f ./Dockerfile -t ner-gcc-arm .

    1. MacOS/Linux: sudo docker build -f ./Dockerfile -t ner-gcc-arm .Note that you only have to do this once really or if the environment was updated, not every time you want to develop

  8. Start sample STM dockerfile :

    Windows:

    with docker run --rm -it --privileged -v "$(PWD):/home/app" ner-gcc-arm:latest bash

  9. MacOS/Linux: sudo docker run --rm -it --privileged -v "$PWD:/home/app" ner-gcc-arm:latest bash

  10. Run make all

Usage

To build repo: make all

To flash with OpenOCD:

To open a serial port:

Old:

List of STM tools to download (lowkey might not even need to download them):
https://www.st.com/en/development-tools/stm32cubeclt.html

...