-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
This section will help you get started with compiling and flashing the code to the octa boards.
[[TOC]]
The arm-none-eabi-gcc compiler has to be installed (link).
For it to work in every folder, it has to be added to the PATH variable.
On linux, the arm-none-eabi-gcc package is recommended.
On Arch linux, the package arm-none-eabi-newlib is also required.
Once installed, the code can be compiled using the make commands.
To support the make commands on Windows, the gnuwin32 package has to be installed.
This binary folder also has to be added to the PATH variable.
On Linux, Make should work as is.
With the on board debugger of the Nucleo board supporting both ST-Link and J-Link firmware, both are supported in the octa-stack.
Out of the box, the on board debugger of the Nucleo board comes with ST-Link installed on it.
To flash with the ST-Link debugger, the STM32CubeProgrammerCLI binaries are provided with the octa-stack.
Make sure the ST-Link usb drivers are installed.
To switch between ST-Link and J-Link and vice versa, a ST-Link Reflash Utility is provided by Segger.
This tool does only work on Windows, but can be used in a Windows Virtual Machine on linux as well.
Once switched to J-Link tools from the J-Link Software and Documentation Pack can be used with the onboard debugger.
This is particularly useful for debugging in vscode.
Every make command has to be run from the folder of the target application.
make flash support is provided for both ST-Link and J-Link, allowing for independency of editor/IDE and the option to work entirely in the CLI.
- make: this command will compile the code to a binary
- make clean: this command cleans up the build folder
- make clean all: this command cleans up the build folder, as well as recompile everything
- make flash-st: this command compiles the code and flashes the binary using ST-Link
- make flash-jlink: this command compiles the code and flashes the binary using J-Link
Due to its flexibility, vscode is suggested as IDE.
A .vscode folder is provided for building and flashing/debugging support.
This file contains make and make clean all tasks for every application in the stack. These tasks can be ran by using the ctrl+Shift+B keyboard shortcut.
The cortex-debug extension is particularly useful for debugging applications. It allows the user to set breakpoints, watch variables, registers, memory etc. This extension only works with J-Link installed on the onboard debugger.
This file contains a launch tasks for every application in the octa-stack. After compiling the binary, it can be flashed and debugged by pressing the F5 button and selecting the correct binary.