Skip to content

Latest commit

 

History

History
58 lines (48 loc) · 2.58 KB

README.md

File metadata and controls

58 lines (48 loc) · 2.58 KB

Developers Guide

Modified: 2022-11

Navigation

  1. Toolchain Installation
  2. STM32 Headers

Note for Windows Installations - The binary files included as part of these software installations should be included as part of your system path. If the installer has the option, be sure to enable system path discovery.

ARM Toolchain Installation

This demo version 10.3 which at the time of writing is the latest arm toolchain. Note that these downloads are large and may take some time.

MacOSX

Get the CMSIS arm-none-eabi-gcc toolchain for ARM Cortex microcontrollers:

brew install --cask gcc-arm-embedded

Windows

Download version 10.3 from the windows install link here

OpenOCD Installation

This demo version 0.11.0 which at the time of writing is the latest openocd version

MacOSX

Get openocd using brew:

brew install openocd

Windows

Download xPack OpenOCD v0.11.0-5 (xpack-openocd-0.11.0-5-win32-x64.zip) from the github release link here

CMake Installation

This demo requires a minimum cmake version 3.24 to build.

MacOSX

Install cmake using brew:

brew install cmake

Windows

Download version 3.34 or higher from the windows install link here

STM32F4 Headers

Get the STM32F4 (and CMSIS) headers from github. You will want to clone this at a location it can be easily referenced across multiple projects:

git clone [email protected]:STMicroelectronics/STM32CubeF4.git

Note: This repository contains a ton of extra overhead meant for CubeIDE and other toolchains. This has no effect on the binary size since only what we include (and subsequent includes) will be used.

VSCode Integration

In order to setup VSCode for development with the STM32F411, it is recommended you install the following extensions:

  1. ms-vscode.cpptools
  2. marus25.cortex-debug
  3. twxs.cmake

Create a .vscode folder in the repository root then copy the files in the vscode directory into it. The files included provide the following capability:

  1. c_cpp_properties.json -> configuration for intellisense and static analysis tools.
  2. launch.json -> plugin for vscode debugging interface.

Because the c_cpp_properties.json requires the compile commands file generated by cmake to operate, you will need to configure cmake for the project in order to realize these changes. The file looks for a compile_commands.json file in the build directory.