Skip to content

Latest commit

 

History

History
44 lines (44 loc) · 2.63 KB

EnvironmentSetup.md

File metadata and controls

44 lines (44 loc) · 2.63 KB

VS Code Environment Setup

Prerequisites

  • NodeJS + NPM
  • Python + PIP
  • Git
  • VS Code

pyOCD

  • pip install pyocd --upgrade
  • pyocd pack update
  • pyocd pack find stm32g0b1
  • pyocd pack install STM32G0B1CEUx

OpenOCD

  • Download the latest version from https://github.com/xpack-dev-tools/openocd-xpack/releases or build it yourself following this guide
  • Unzip it to OpenOCD folder in C:\Program Files
  • Set OpenOCD system variable to 'C:\Program Files\OpenOCD'
  • Add %OpenOCD%\bin to system PATH variable
  • Set XDG_CACHE_HOME env variable to %USERPROFILE%\AppData\Local\Temp to prevent symbol cache path error

Note: xpm utility does not really support global installations (yet), hence I suggest the above approach.

SVD file - MPU specific

Download from https://github.com/posborne/cmsis-svd/tree/master/data/STMicro and place in the Software root folder.

GNU Arm Embedded Toolchain

  • required version: arm-none-eabi (bare-metal target)
  • Download from https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack
  • Set MBED_GCC_ARM_PATH env variable to C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.2 2022.02\bin (latest version Windows path).
  • Add MBED_GCC_ARM_PATH env variable to Windows Path env variable (%MBED_GCC_ARM_PATH%) - if not set by the installer.

Note: the most official build can be found here but I do not recomment using it. arm-none-eabi-gdb ver. 11.2 has a buggy dependency on unsupported and retired Python 2.7.

Required NPM packages

  • npm install -g cppbuild
  • npm install -g shx
  • npm install -g @serialport/terminal

Required VS Code plug-ins

VS Code config

  • Set the default VS Code terminal to Git Bash. Otherwise, VS Code may try to execute task NPM packages as (e.g.) PowerShell scripts.

Recommended VS Code plug-ins

  • LinkerScript (Zixuan Wang)
  • Arm Assembly (dan-c-underwood)
  • Code Spell Checker (Street Side Software)
  • Build++ (Tomasz Jastrzębski)

ST Utilities