Skip to content

Using git repository

Frederic Pillon edited this page Mar 15, 2018 · 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:

2. Delete the stm32 core extracted package

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

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

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>

At this step, you are able to build using the git repository but upload is broken.
.../massStorageCopy": error=2, No such file or directory
or
.../stlink_upload": error=2, No such file or directory

Uploader tools path need to be updated in platform.txt at the root of the git repository.
Replace all {runtime.hardware.path} by {runtime.tools.STM32Tools.path}
That's all.

/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: stm
/img/Note-icon.png Directory name is not important stm is an example.

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!

At this step, you are able to build using the git repository but upload is broken.
.../massStorageCopy": error=2, No such file or directory
or
.../stlink_upload": error=2, No such file or directory

From the same directory clone the Arduino_Tools git repository:

git clone https://github.com/stm32duino/Arduino_Tools.git tools

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

So, you should have two directories in \<Arduino install directory\>/hardware/stm/
stm32 and tools

/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