Skip to content

Commit 1dbefbd

Browse files
committed
chore(docs): enhance libraries structure (part 2)
Signed-off-by: Frederic Pillon <frederic.pillon@st.com> Assisted-by: GitHub Copilot: GPT-6 Luna
1 parent 45ca575 commit 1dbefbd

5 files changed

Lines changed: 265 additions & 182 deletions

File tree

‎CI/update/README.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,21 @@ The path have to be defined in `update_config.json`.
1616

1717
After file generation, review them carefully and please report any issue
1818
[here](https://github.com/stm32duino/Arduino_Core_STM32/issues).
19+
20+
## Update the STM32duino library list
21+
22+
Run `python CI/update/stm32libraries.py` from the `Arduino_Core_STM32` repository
23+
to fetch public STM32duino repositories that contain a root-level
24+
`library.properties` and refresh the generated section in
25+
`docs/libraries/index.md`. The script groups libraries by their declared
26+
category, puts expansion-board libraries in a separate section, includes
27+
declared dependencies (linking STM32duino dependencies when available), and
28+
sorts entries alphabetically. Review and commit the updated documentation
29+
manually; this script is not run by CI.
30+
31+
`REPO_STM32DUINO` in `update_config.json` selects the local directory where
32+
library repositories are cloned or fetched. Absolute paths are used as
33+
configured; relative paths are resolved from the `Arduino_Core_STM32` repository
34+
root. If the file or setting is missing, the script writes the default
35+
`REPO_STM32DUINO` path (the core repository root), asks you to check the
36+
configuration, and exits; run it again after reviewing the generated setting.

‎docs/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ After installation, try the [Blink example](examples/Blink-example.md). For help
1717

1818
- [Supported boards](supported-boards/index.md)
1919
- [Arduino API reference](API.md)
20-
- [Libraries](libraries/index.md), including built-in, dedicated, and expansion-board libraries
20+
- [Libraries](libraries/index.md), including built-in, STM32-specific libraries, and expansion-board libraries
2121
- [Hosted library API documentation](libraries/Hosted-library-documentation.md)
2222

2323
## Develop and customize
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Additional Libraries and Compatibility
2+
3+
This page lists Arduino libraries known to work with the STM32 core and
4+
community-reported library tests. Compatibility can vary by library version,
5+
board, STM32 device, and connected hardware; check the linked project
6+
documentation for details. Contributions with additional tested combinations
7+
are welcome.
8+
9+
## Official Arduino libraries
10+
11+
- [TFT](https://github.com/arduino-libraries/TFT/): use release [1.0.6](https://github.com/arduino-libraries/TFT/releases/tag/1.0.6) or later; otherwise use [Ucglib_Arduino](https://github.com/olikraus/Ucglib_Arduino)
12+
- [LiquidCrystal](https://github.com/arduino-libraries/LiquidCrystal)
13+
- [Ethernet](https://github.com/arduino-libraries/Ethernet)
14+
- [WiFi](https://github.com/arduino-libraries/WiFi)
15+
16+
## Community-tested libraries
17+
18+
| Library | Reported test |
19+
| --- | --- |
20+
| [arduino-LoRa](https://github.com/sandeepmistry/arduino-LoRa) | Tested with B-L072Z-LRWAN1 |
21+
| [Firmata](https://github.com/firmata/arduino) | Supported since release 2.5.7 |
22+
| [OneWire](https://github.com/PaulStoffregen/OneWire) | Library for Dallas/Maxim 1-Wire chips |
23+
| [PubSubClient](https://github.com/knolleary/PubSubClient) | Tested on L475 Discovery IoT using Wi-Fi |
24+
| [RTClib](https://github.com/adafruit/RTClib) | Tested with Adafruit module 3296 |
25+
| [Ucglib_Arduino](https://github.com/olikraus/Ucglib_Arduino) | Tested with ST7735 |
26+
| [UIPEthernet](https://github.com/UIPEthernet/UIPEthernet) | Tested with ENC28J60 module |
27+
28+
## Library compatibility
29+
30+
When a library needs to distinguish STM32duino from other Arduino cores, use
31+
the `ARDUINO_ARCH_STM32` preprocessor macro. The core defines it when compiling
32+
for STM32duino. For example:
33+
34+
```cpp
35+
#if defined(ARDUINO_ARCH_STM32)
36+
// STM32duino-specific code
37+
#endif
38+
```
39+
40+
See the [FAQ example](../FAQ.md#how-do-i-know-which-stm32duinolibmaple-core-am-i-running-on)
41+
for how this macro distinguishes STM32duino from the legacy libmaple core.

0 commit comments

Comments
 (0)