Skip to content

Furmanchuk/glsk_stm32_toolchain

 
 

Repository files navigation

GlobalLogic Starter Kit resources

Requirements

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.

  • OpenOCD.

    Stable version: openocd (Not recommended as it is outdated and incompatible with our openocd config. If you prefer stable version, use openocd -f board/stm32f4discovery.cfg instead of our openocd -f openocd_glstarterkit.cfg)
    Latest Git version: openocd-git (through AUR)
  • arm-none-eabi Toolchain

    Official release verison:

    GCC: arm-none-eabi-gcc
    Binutils: arm-none-eabi-binutils
    GDB: arm-none-eabi-gdb
    Newlib: arm-none-eabi-newlib
  • Doxygen and GraphViz for building libopencm3 documentation

    doxygen and graphviz packages

Add user to plugdev group:

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)

Install all packages:

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

Documentation

Documents listed here:
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.

Useful links

How to start

  1. Make sure you have completed the installation steps described in Requirements first.

  2. 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
    
  3. Study the Makefile. It is crucial to understand how tools work for properly using them.

  4. Build example projects

  5. 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 TARGET to the name of your project top-level file

License

Everything in this repository, except the STMicroelectronics documentation is licensed under the MIT License.
See LICENSE for details.

For more on STMicroelectronics documentation licensing consider their official website (https://st.com)

Contact information

Should you have questions, feel free to contact me via Telegram (@thodnev) or e-mail (thodnev <at> xinity.dev)

About

GlobalLogic Starter Kit resources

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 88.0%
  • Makefile 11.4%
  • C++ 0.6%