Skip to content

Commit e57b468

Browse files
committed
Merge branch 'pr329' into merge
Conflicts: .github/workflows/build.yml .github/workflows/checkpatch.yml .github/workflows/format_check.yml .github/workflows/license_check.yml .gitignore CMakeLists.txt README.md cores/arduino/Arduino.h cores/arduino/main.cpp cores/arduino/zephyrCommon.cpp cores/arduino/zephyrPrint.cpp cores/arduino/zephyrPrint.h cores/arduino/zephyrSerial.cpp cores/arduino/zephyrSerial.h documentation/variants.md samples/analog_input/CMakeLists.txt samples/attach_interrupt/CMakeLists.txt samples/blinky_arduino/CMakeLists.txt samples/button_press_led/CMakeLists.txt samples/fade/CMakeLists.txt samples/hello_arduino/CMakeLists.txt samples/hello_arduino/src/app.cpp samples/i2cdemo/CMakeLists.txt samples/serial_event/CMakeLists.txt samples/spi_controller/CMakeLists.txt samples/threads_arduino/CMakeLists.txt variants/arduino_nano_33_ble_nrf52840_sense/variant.h variants/arduino_nano_33_ble_sense/variant.h variants/arduino_opta_stm32h747xx_m7/variant.h west.yml
2 parents 8aca08e + b37a806 commit e57b468

173 files changed

Lines changed: 42662 additions & 317 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[submodule "libraries/Arduino_RouterBridge"]
2+
path = libraries/Arduino_RouterBridge
3+
url = https://github.com/arduino-libraries/Arduino_RouterBridge.git
4+
[submodule "libraries/Arduino_RPClite"]
5+
path = libraries/Arduino_RPClite
6+
url = https://github.com/arduino-libraries/Arduino_RPClite.git

Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,23 @@ config ARDUINO_MAX_TONES
4242
If set to a negative value, the maximum number will be determined from the
4343
system's digital pin configuration.
4444
endif
45+
46+
if USB_DEVICE_STACK_NEXT
47+
48+
config USB_DEVICE_PRODUCT
49+
string "USB Device Product"
50+
default "Arduino Generic board"
51+
52+
config USB_DEVICE_MANUFACTURER
53+
string "USB Device Manufacturer"
54+
default "Arduino"
55+
56+
config USB_DEVICE_VID
57+
hex "USB Device Vendor ID"
58+
default 0x2341
59+
60+
config USB_DEVICE_PID
61+
hex "USB Device Product ID"
62+
default 0x0001
63+
64+
endif

README.gsoc.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# GSoC 2022 Project: Arduino Core API module for Zephyr
2+
3+
![](https://dhruvag2000.github.io/Blog-GSoC22/assets/images/website_header.png)
4+
5+
The **Arduino Core API** module for zephyr leverages the power of Zephyr under an Arduino-C++ style abtraction layer thus helping zephyr new-comers to start using it without worrying about learning about new APIs and libraries. See the project documentation folder for detailed documentation on these topics:
6+
7+
* [Using external Arduino Libraries](/documentation/arduino_libs.md)
8+
* [Adding custom boards/ variants](/documentation/variants.md)
9+
10+
## Adding Arduino Core API to Zephyr
11+
12+
* **Pre requisites:** It is assumed that you have zephyrproject configured and installed on your system as per the official [Get Started Guide](https://docs.zephyrproject.org/latest/develop/getting_started/index.html). The recommended path to install is `~/zephyrproject` as specified in the guide. If you have zephyr installed in a custom path you may need to make changes to the CMakeLists.txt file in the sample code directory when building these samples.
13+
14+
* Add following entry to `west.yml` file in `manifest/projects` subtree of Zephyr:
15+
```
16+
# Arduino API repository.
17+
- name: Arduino-Core-Zephyr
18+
path: modules/lib/Arduino-Zephyr-API
19+
revision: main
20+
url: https://github.com/zephyrproject-rtos/gsoc-2022-arduino-core
21+
```
22+
23+
* Then, clone the repository by running
24+
25+
```sh
26+
west update
27+
```
28+
29+
* **Note:** For ***Linux users only*** there exists an ``install.sh`` script in this project that can be run to quickly link the ArduinoCore-API to this module.
30+
If you are able to run that script successfully then you can skip the next steps.
31+
32+
* To "complete" the core you need to copy or symlink the api folder from the [ArduinoCore-API](https://github.com/arduino/ArduinoCore-API.git) repo to the target's ``cores/arduino`` folder:
33+
```sh
34+
$ git clone git@github.com:arduino/ArduinoCore-API # Any location
35+
$ ln -s /<your>/<location>/ArduinoCore-API/api cores/arduino/.
36+
```
37+
The `cores` folder can be found at `~/zephyrproject/modules/lib/Arduino-Zephyr-API/cores`.
38+
39+
**Known Bug(s):**
40+
41+
__NOTE:__ You can skip this step as well if you ran ``install.sh``.
42+
43+
**Maintainers**:
44+
- [DhruvaG2000](https://github.com/DhruvaG2000)
45+
- [soburi](https://github.com/soburi)
46+
- [szczys](https://github.com/szczys)
47+
- [beriberikix](https://github.com/beriberikix)
48+
- [alvarowolfx](https://github.com/alvarowolfx)
49+
50+
## License
51+
Please note that the current license is Apache 2. Previously it was LGPL 2.1 but after careful review it was determined that no LGPL code or derivates was used and the more permissive license was chosen.
52+
53+
**Additional Links**
54+
* [Official Project Blog](https://dhruvag2000.github.io/Blog-GSoC22/)
55+
* Golioth's Article: [Zephyr + Arduino: a Google Summer of Code story](https://blog.golioth.io/zephyr-arduino-a-google-summer-of-code-story/)

0 commit comments

Comments
 (0)