Note
Arch Linux means access to the most recent software versions. Package names and installation commands provided here are given for the Arch Linux and its derivatives (i.e. Manjaro).
If you are using another distro, you need to figure the package names yourself or use something like Archlinux Docker image.
-
Stable version:
openocd(Not recommended as it is outdated and incompatible with our openocd config. If you prefer stable version, useopenocd -f board/stm32f4discovery.cfginstead of ouropenocd -f openocd_glstarterkit.cfg)Latest Git version:openocd-git(through AUR) -
Official release verison:
Doxygen and GraphViz for building libopencm3 documentation
doxygenandgraphvizpackages
This step is required to allow working with debuggers OpenOCD supports as a user, without a need for having root privileges.
OpenOCD package on Arch comes with udev rules file (/usr/lib/udev/rules.d/60-openocd.rules).
It gives access rights to users in plugdev group, which exists on Debian, but is not present
on Arch Linux. So we need to create the group and add our user to it:
sudo groupadd -r -g 46 plugdev
sudo useradd -G plugdev $USER
And log out (or reboot)
yay -S openocd-git
sudo pacman -S arm-none-eabi-{gcc,binutils,gdb,newlib} doxygen graphviz
Note
You need to either run sudo udevadm control --reload-rules and sudo udevadm trigger
or to reboot after installing OpenOCD for udev rules to start working
| STM32F407 Reference Manual | Main document on the whole STM32F4 family and its peripherals. |
| STM32 Cortex-M4 MCUs and MPUs Programming Manual | Describes features specific to Cortex-M4 core and core-related peripherals (Interrupt Controller, Floating-Point Unit, ...). |
| STM32F407 Datasheet | Datasheet describes specific features of concrete STM32F4 MCU (memory size, pinout, available peripherals, ...). |
| STM32F40x Errata | Chips usually have errors due to design mistakes. Errors are described and Erratas and are being fixed in later silicon revisions. If something should work, but it does not – check errata as you may be dealing with an old chip revision. |
| STM32F4DISCOVERY User Manual | Document provides information on STM32F4DISCOVERY board and serves as a good quick reference on how to use one or another board peripheral, which is faster and easier than directly looking into board schematic. |
| STM32F4DISCOVERY Schematic | Sometimes you will need to look in the schematic, in cases when the User Manual does not provide enough information. |
| GlobalLogic Starter Kit Schematic | GL-SK kit consists of two boards. This document is the main source of information on external modules the GL-SK board has. |
- libopencm3 Developer Documentation
or build it yourself (
make TARGETS=stm32/f4 lib htmlinside libopencm3 folder) - STM32F407VG STMicroelectronics Resources page
- STM32F4DISCOVERY STMicroelectronics Resources page
Make sure you have completed the installation steps described in Requirements first.
Recursively clone the repository:
git clone --recursive https://github.com/kpi-keoa/glsk_stm32_toolchain
or clone first and then initialize all submodules
git clone https://github.com/kpi-keoa/glsk_stm32_toolchain git submodule update --init --recursive
Study the Makefile. It is crucial to understand how tools work for properly using them.
Build example projects
Start your own project using this repository as a template.
For that, you will probably need to delete the documentation and example directories. And at least change
TARGETto the name of your project top-level file
Should you have questions, feel free to contact me via Telegram (@thodnev) or e-mail (thodnev <at> xinity.dev)