Skip to content

Commit 192026b

Browse files
committed
chore: update using git repository
Signed-off-by: Frederic Pillon <[email protected]>
1 parent 932e766 commit 192026b

File tree

1 file changed

+31
-16
lines changed

1 file changed

+31
-16
lines changed

_dev/Using-git-repository.md

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
To use the [Arduino_Core_STM32](../) git repository instead of the package version, follow those steps:
1+
To use the [Arduino_Core_STM32] git repository instead of the packaged version, follow those steps:
22

3-
## 1. Install the STM32 Cores package
3+
## 1. Install the STM32 Core packages
44

55
To get started with development on `main` branch, correct versions of the required dependencies have to be installed (see: [platform.txt](../blob/main/platform.txt)):
66
* [CMSIS](https://www.arm.com/products/processors/cortex-m/cortex-microcontroller-software-interface-standard.php): ARM® Cortex® Microcontroller Software Interface Standard
77
* [GNU Arm Embedded Toolchain](https://developer.arm.com/open-source/gnu-toolchain/gnu-rm): 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://xpack.github.io/arm-none-eabi-gcc/): https://github.com/xpack-dev-tools/arm-none-eabi-gcc-xpack
8+
* [OpenOCD](https://openocd.org/): 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://xpack-dev-tools.github.io/openocd-xpack/): https://github.com/xpack-dev-tools/openocd-xpack
89
* [STM32Tools](https://github.com/stm32duino/Arduino_Tools): upload tools for STM32 based boards and some other useful scripts
10+
* [stm32_svd](https://github.com/stm32duino/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.
911

10-
Using the git repository requires sometimes to update tools dependencies.
12+
> [!IMPORTANT]
13+
> Using the git repository requires sometimes to update tools dependencies.
1114
12-
Example when the arm-none-abi-gcc toolchain or the CMSIS version are updated. In that case, all dependencies are available in the [package_stmicroelectronics_index.json](https://github.com/stm32duino/BoardManagerFiles/blob/dev/package_stmicroelectronics_index.json) of the BoardManagerFiles `dev` branch.
15+
Example when the arm-none-abi-gcc toolchain or the CMSIS version are updated. In that case, all dependencies are available in a dedicated [package index](https://arduino.github.io/arduino-cli/latest/package_index_json-specification/): [package_stmicroelectronics_index.json](https://github.com/stm32duino/BoardManagerFiles/blob/dev/package_stmicroelectronics_index.json) of the [BoardManagerFiles `dev`](https://github.com/stm32duino/BoardManagerFiles) branch.
1316

14-
See the [[Getting Started]] page to see how to install the core and its tools dependencies but use this link in the "Additional Boards Managers URLs" field:
17+
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:
1518

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

@@ -20,31 +23,43 @@ Then install the latest version displayed by the board manager, if a version is
2023
This will install the required dependencies for the main branch.
2124

2225
## 2. Delete the stm32 core extracted package
23-
Go to the installed package directory: [[Where-are-sources]]
2426

25-
Delete the version directory: `<x.y.z>` or `<x.y.z-dev>`
27+
Go to the installed package directory, see [[Where-are-sources]] to find it.
2628

27-
Note: 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 - it will cause problems later. If you want to keep it, move it somewhere else entirely.
29+
Then delete the stm32 version directory:
30+
31+
`<Arduino IDE install directory>/packages/STMicroelectronics/hardware/stm32/<x.y.z>`.
32+
33+
or
34+
35+
`<Arduino IDE install directory>/packages/STMicroelectronics/hardware/stm32/<x.y.z-dev>`.
36+
37+
> [!IMPORTANT]
38+
> 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.
39+
> If you do not, in "**Tools > Board**" menu, you should have twice the "**STM32 board**" menu.
2840
2941
## 3. Cloning the git repository to replace the stm32 core version package (1st method)
3042

31-
Directory of step 2 is now deleted.<br>
43+
Directory of step 2 is now deleted.
3244

33-
In the "_**\<local Arduino directory\>/packages/STMicroelectronics/hardware/stm32/**_" do the clone:<br>
45+
In the `<Arduino IDE install directory>/packages/STMicroelectronics/hardware/stm32/` do the clone:
3446

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

37-
where _\<version\>_ is the one you delete in step [2.](#2-delete-the-stm32-core-extracted-package)<br>
38-
For this example: _**2.0.0**_<br>
39-
So, do:<br>
49+
where `<version>` is the same one you deleted in step [2.](#2-delete-the-stm32-core-extracted-package)
4050

41-
`git clone https://github.com/stm32duino/Arduino_Core_STM32.git 2.0.0`
51+
For this example: `2.8.1`:
52+
53+
`git clone https://github.com/stm32duino/Arduino_Core_STM32.git 2.8.1`
54+
55+
> [!TIP]
56+
> Of course you can use a [fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) of the [Arduino_Core_STM32] to be able to contribute and easily create [Pull Requests](https://help.github.com/articles/about-pull-requests/)
4257
4358
> [!TIP]
4459
> On Linux, It is possible to clone it elsewhere and create a symlink named \<version>
4560
4661
> [!CAUTION]
4762
> Uninstalling from the boards managers will remove the git repository!
4863
49-
> [!NOTE]
50-
> If you do not have deleted the stm32 core extracted package (step [2.](#2-delete-the-stm32-core-extracted-package)), in "**Tools > Board**" menu, you will have twice the "**STM32 board**" menu.<br>
64+
65+
[Arduino_Core_STM32]: ../

0 commit comments

Comments
 (0)