Skip to content

Using git repository

Peter edited this page Nov 12, 2020 · 26 revisions

To use the Arduino_Core_STM32 git repository instead of the package version, follow those steps:

1. Install the STM32 Cores package

See the Getting Started page. This will install the required dependencies for the current released version. To get started with development on master you must install the correct versions of the required dependencies (see: platform.txt):

  • CMSIS: ARM® Cortex® Microcontroller Software Interface Standard
  • arm-none-eabi-gcc: GNU ARM Embedded Toolchain
  • STM32Tools: upload tools for STM32 based boards and some other usefull scripts (ex: genpinmap)

2. Delete the stm32 core extracted package

Go to the installed package directory: Where-are-sources

Delete the version directory: <x.y.z>

Note: There must be no other directories along side the <x.y.z> directory, so don't just rename the old one - it will cause problems later. If you want to keep it, move it somewhere else entirely.

3. Hereafter, 2 methods to use git repository

Directory of step 2 is now deleted.

3.1. Cloning the git repository to replace the stm32 core version package (1st method)

In the "<local Arduino directory>/packages/STM32/hardware/stm32/" do the clone:

git clone https://github.com/stm32duino/Arduino_Core_STM32.git <version>

where <version> is the one you delete in step 2.
For this example: 1.1.1
So, do:

git clone https://github.com/stm32duino/Arduino_Core_STM32.git 1.1.1

/img/Tips-icon.png It is possible to clone it elsewhere and create a symlink named <version>

/img/Important-icon.png Uninstalling from the boards managers will remove the git repository!

3.2. Adding repositories in Arduino/hardware directory (2nd method)

Go to the "<Arduino install directory>/hardware/" and create a directory named: STM32
/img/Warning-icon.png The name of the new directory to clone into must be STM32!

Go to this new directory then do the clone:

git clone https://github.com/stm32duino/Arduino_Core_STM32.git stm32

/img/Warning-icon.png The name of the new directory to clone into must be stm32!

/img/Note-icon.png If you do not have deleted the stm32 core extracted package (step 2.), in "Tools > Board" menu, you will have twice the "STM32 board" menu.

Clone this wiki locally