Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

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. Update wsl2 stuff https://learn.microsoft.com/en-us/windows/wsl/install-manual#step-4---download-the-linux-kernel-update-package 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 with 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

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

  9. (If interacting with hardware) Mount the Ra spberry Pi probe by finding the device in the Windows terminal with usbipd wsl list and mount the device with usbipd wsl attach --busid=<BUSID>

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

https://www.st.com/en/development-tools/stm32cubemx.html

https://www.st.com/en/development-tools/st-mcu-finder-pc.html#get-software

https://www.st.com/en/development-tools/stm32cubeide.html#get-software

Then install the “STM32 VS Code Extension” in VS Code. Now you have the full functionality of STM Cube IDE in VSCode!

Windows

sudo port install openocd

  • No labels