-
Notifications
You must be signed in to change notification settings - Fork 982
Using git repository
To use the Arduino_Core_STM32 git repository instead of the packaged version, follow those steps:
To get started with development on main
branch, correct versions of the required dependencies have to be installed (see: platform.txt):
- CMSIS: ARM® Cortex® Microcontroller Software Interface Standard
- GNU Arm Embedded Toolchain: Arm Embedded GCC compiler, libraries and other GNU tools necessary for bare-metal software development on devices based on the Arm Cortex-M. Packages are provided thanks The xPack GNU Arm Embedded GCC: https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack
- OpenOCD: the Open On-Chip Debugger provides on-chip programming and debugging support with a layered architecture of JTAG interface and TAP support. Packages are provided thanks The xPack OpenOCD: https://github.com/xpack-dev-tools/openocd-xpack
- STM32Tools: upload tools for STM32 based boards and some other useful scripts
- stm32_svd: System View Description files. It is the description of the system contained in the stm32, in particular, the memory mapped registers of peripherals.
Important
Using the git repository requires sometimes to update tools dependencies. To check if you need to install new dependencies:
- open the dedicated package index: package_stmicroelectronics_index.json of the BoardManagerFiles
dev
branch. - 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.
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.
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!
-
Advanced usages