Skip to content

Using git repository

Frederic Pillon edited this page Nov 21, 2024 · 27 revisions

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

1. Install the STM32 Core packages

To get started with development on main branch, correct versions of the required dependencies have to be installed (see: platform.txt):

Important

Using the git repository requires sometimes to update tools dependencies. To check if you need to install new dependencies:

  1. open the dedicated package index: package_stmicroelectronics_index.json of the BoardManagerFiles dev branch.
  2. If a version is suffixed by -dev it means one or more dependencies have been updated else no change done since the last release, so no need to perform a new installation. Dependencies are already satisfied.

Example when the arm-none-abi-gcc toolchain or the CMSIS version are updated. New dependencies are added in this dedicated package index: package_stmicroelectronics_index.json of the BoardManagerFiles dev branch.

See the Getting Started page to see how to install the core and its tools dependencies except you have to use this link in the "Additional Boards Managers URLs" field instead of the one specified if a suffixed -dev version exist to install the required dependencies for the main branch of the Arduino_Core_STM32:

https://raw.githubusercontent.com/stm32duino/BoardManagerFiles/dev/package_stmicroelectronics_index.json

Important

Here, it is expected you have the core and its tools dependencies installed.

2. Delete the stm32 core extracted package

Go to the installed package directory, see Where-are-sources to find it.

Then delete the stm32 version directory:

<Arduino IDE install directory>/packages/STMicroelectronics/hardware/stm32/<x.y.z>.

or

<Arduino IDE install directory>/packages/STMicroelectronics/hardware/stm32/<x.y.z-dev>.

Important

There must be no other directories along side the <x.y.z> or <x.y.z-dev> directory, so don't just rename the old one. If you want to keep it, move it somewhere else entirely. If you do not, in "Tools > Board" menu, you should have twice the "STM32 board" menu.

3. Cloning the git repository to replace the stm32 core version package

Directory of step 2 is now deleted.

In the <Arduino IDE install directory>/packages/STMicroelectronics/hardware/stm32/ do the clone:

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

where <version> is the same one you deleted in step 2.

For this example: 2.8.1:

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

Tip

Of course you can use a fork of the Arduino_Core_STM32 to be able to contribute and easily create Pull Requests

Tip

On Linux, It is possible to clone it elsewhere and create a symlink named <version>

Caution

Uninstalling from the boards managers will remove the git repository!

Clone this wiki locally