Skip to content

Commit 0700fe9

Browse files
Aymane-STfpistm
authored andcommitted
docs: update README with STM32duino integration information
Signed-off-by: Aymane Bahssain <aymane.bahssain@st.com> Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent fc1be8e commit 0700fe9

1 file changed

Lines changed: 64 additions & 59 deletions

File tree

‎README.md‎

Lines changed: 64 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,100 @@
1-
# ArduinoCore-API
1+
# 📚 ArduinoCore-API for STM32duino
22

3-
[![Unit Tests](https://github.com/arduino/ArduinoCore-API/workflows/Unit%20Tests/badge.svg)](https://github.com/arduino/ArduinoCore-API/actions?workflow=Unit+Tests)
4-
[![codecov](https://codecov.io/gh/arduino/ArduinoCore-API/branch/master/graph/badge.svg)](https://codecov.io/gh/arduino/ArduinoCore-API)
5-
[![Spell Check status](https://github.com/arduino/ArduinoCore-API/actions/workflows/spell-check.yml/badge.svg)](https://github.com/arduino/ArduinoCore-API/actions/workflows/spell-check.yml)
3+
Fork of [`arduino/ArduinoCore-API`](https://github.com/arduino/ArduinoCore-API)
4+
Designed to be used as a git submodule in [`stm32duino/Arduino_Core_STM32`](https://github.com/stm32duino/Arduino_Core_STM32)
65

7-
This repository hosts the hardware independent layer of Arduino core. In other words it contains the abstract definition of the Arduino core API, consisting of hardware-independent header files that are then included and implemented by the various platform-specific cores.
6+
---
87

9-
Having a single place where the Arduino API is defined means that there is no longer a String implementation within every Arduino core (a String module within ArduinoCore-avr, a String module within ArduinoCore-samd, a String module within ArduinoCore-megaavr …) but rather one String implementation within ArduinoCore-API which all other cores utilise. This has the pleasant side effects that bugs fixed or features added within the ArduinoCore-API String implementation are automatically propagated to all cores utilizing ArduinoCore-API.
8+
## 🎯 Purpose
109

11-
As of now, the following official cores are utilising ArduinoCore-API:
10+
This repository is a fork which reworks the folder structure to contain only the official Arduino API and hardware‑independent code, in order to simplify Arduino API integration into STM32duino via a git submodule.
1211

13-
* [megaavr](https://github.com/arduino/ArduinoCore-megaAVR)
14-
* [mbed](https://github.com/arduino/ArduinoCore-mbed)
15-
* [samd](https://github.com/arduino/ArduinoCore-samd)
16-
* [renesas](https://github.com/arduino/ArduinoCore-renesas)
12+
It will also contain some updates/changes/enhancements/fixes.
1713

18-
There's an ongoing effort to port the others, while maintainers of third-party cores are strongly invited to follow the same route in order to stay up-to-date with the new language features. For backwards compatibility, every revision of this repo will increase the `ARDUINO_API_VERSION` define.
14+
---
1915

20-
## Documentation
16+
## 📦 What's Included?
2117

22-
The Arduino API is documented in the official [language reference](https://www.arduino.cc/reference/en/), whose sources are located in [this repository](https://github.com/arduino/reference-en) and are open to contributions from the community.
18+
- ✅ Official Arduino API files (`api/` folder)
19+
- ✅ some updates, changes, enhancements and fixes.
2320

24-
## Support
21+
---
2522

26-
This repository is not directly usable by final users. If you need assistance with Arduino, see the [Help Center](https://support.arduino.cc/) and browse the [forum](https://forum.arduino.cc).
23+
## 🚀 Submodule usage
2724

28-
## Development
25+
### 1️⃣ Add the Submodule
2926

30-
### Bugs & Issues
27+
In the `Arduino_Core_STM32` repository, run:
3128

32-
If you want to report an issue with this core, you can submit it to the [issue tracker](https://github.com/arduino/ArduinoCore-API/issues) of this repository. Some rules apply:
33-
34-
* If your issue is about a specific hardware platform, report it to its repository. This one is only about discussing the generic API.
35-
* Before posting, please check if the same problem has been already reported by someone else to avoid duplicates.
36-
* Remember to include as much detail as you can about your hardware set-up, code and steps for reproducing the issue. Make sure you're using an original Arduino board.
37-
38-
### Contributions
29+
```bash
3930

40-
Contributions are always welcome! You can submit them directly to this repository as Pull Requests. Please provide a detailed description of the problem you're trying to solve. We also appreciate any help in testing issues and patches contributed by other users.
31+
git submodule add https://github.com/stm32duino/ArduinoCore-API.git cores/arduino/api
32+
```
33+
### 2️⃣ Initialize and update
34+
```bash
35+
git submodule update --init
36+
```
4137

42-
### Unit testing
38+
---
4339

44-
This repository includes a test suite that covers most of the API and that is designed to run on generic hardware, thus not requiring a development board. We call this _host-based unit-testing_. In order to test the features that are only defined but not implemented in this repository, mock implementations are included.
40+
## 🔗 Official Resources
4541

46-
Please help us improve the coverage of the test suite!
42+
| Resource | Link |
43+
|----------|------|
44+
| **Official ArduinoCore-API** | https://github.com/arduino/ArduinoCore-API |
45+
| **STM32duino** | https://github.com/stm32duino/Arduino_Core_STM32 |
4746

48-
#### To build and run unit tests
47+
---
4948

50-
The unit tests are automatically built by GitHub as part of pull request checks (in `.github/workflows/unit-tests.yml`).
49+
## 📝 License
5150

52-
To build and run locally:
51+
This repository is a fork of `arduino/ArduinoCore-API` and maintains the **same license** (LGPL 2.1+).
5352

54-
**Dependencies**
53+
See the [LICENSE](License) file in the repository root for details.
5554

56-
* [CMake](https://cmake.org/)
57-
* [GCC](https://gcc.gnu.org/)
55+
---
5856

59-
On (Ubuntu) Linux run:
57+
## 💡 Important Notes
6058

61-
```bash
62-
sudo apt-get install build-essential cmake
63-
```
59+
### ✅ Advantages of Using a Submodule
6460

65-
From the project root:
61+
- **Traceability**: Know exactly which version of the API you're using
62+
- **Easy Updates**: Simple `git submodule update` to sync
63+
- **Isolation**: API stays in its own code branch
64+
- **Compatibility**: STM32-specific modifications remain separate
6665

67-
```bash
68-
cd test && mkdir build && cd build
69-
cmake ..
70-
make && bin/test-ArduinoCore-API
71-
```
66+
### ⚠️ Points to Consider
7267

73-
### Implementing ArduinoCore-API
68+
- After cloning **Arduino_Core_STM32**, run:
69+
```bash
70+
git submodule update --init --recursive
71+
```
7472

75-
In order to compile a core which is implementing ArduinoCore-API you'll need to copy/symlink the `api` directory to the target's `cores/arduino` directory as part of your development and release workflow. The most elegant and effective solution is to develop your core with `api` symlinked and produce the distributable archive by telling `tar` to follow symlinks. Example:
73+
---
7674

77-
```bash
78-
tar --exclude='*.git*' -cjhvf $yourcore-$version.tar.bz2 $yourcore/
79-
```
75+
## 📊 Project Information
8076

81-
The API is coded to the C++11 standard and the core's compiler must be able to support that version of the language.
77+
| Property | Value |
78+
|----------|-------|
79+
| **Type** | fork |
80+
| **Use Case** | Submodule for STM32duino |
81+
| **Language** | C/C++ |
82+
| **License** | LGPL 2.1+ |
83+
| **Original Repository** | https://github.com/arduino/ArduinoCore-API |
84+
---
8285

83-
Documentation for how to integrate with a Arduino core (which is necessary if you do not download the Arduino core via the Boards Manager) can be found here:
84-
* [ArduinoCore-megaavr](https://github.com/arduino/ArduinoCore-megaavr#developing)
85-
* [ArduinoCore-mbed](https://github.com/arduino/ArduinoCore-mbed#clone-the-repository-in-sketchbookhardwarearduino-git)
86-
* [ArduinoCore-samd](https://github.com/arduino/ArduinoCore-samd/#developing)
86+
## ✨ Quick Start
8787

88-
## Donations
88+
### Clone **Arduino_Core_STM32** with this submodule
8989

90-
This open source code is maintained by Arduino with the help of the community. We invest a considerable amount of time in testing code, optimizing it and introducing new features. Please consider [donating](https://www.arduino.cc/en/donate/) or [sponsoring](https://github.com/sponsors/arduino) to support our work, as well as [buying original Arduino boards](https://store.arduino.cc) which is the best way to make sure our effort can continue in the long term.
90+
```bash
91+
git clone --recurse-submodules https://github.com/stm32duino/Arduino_Core_STM32.git
92+
```
9193

92-
## License and credits
94+
### Update submodule
9395

94-
This code is licensed under the terms of the GNU LGPL 2.1. If you have questions about licensing please contact us at [license@arduino.cc](mailto:license@arduino.cc).
96+
```bash
97+
git submodule update --remote
98+
```
9599

100+
---

0 commit comments

Comments
 (0)