谷歌编程之夏与 Zephyr RTOS 项目介绍
Zephyr GSoC
![](/data/attachment/album/202207/12/102306u5vlj0ek5llhlkph.jpg)


**谷歌编程之夏**（GSoC）是一个谷歌举办的国际年度项目，每年都在夏季举办。当贡献者们参与并完成一个 [自由开源软件](https://en.wikipedia.org/wiki/Free_and_open-source_software) 的编码项目，[谷歌](https://en.wikipedia.org/wiki/Google) 就会给他们发放 [津贴](https://en.wikipedia.org/wiki/Stipend)。谷歌编程之夏于 2005 年推出，于每年 5 月至 8 月举行。项目创意由参与开源软件开发的主办组织提交，但学生也可以提出自己的项目创意。


今年，该项目向 18 岁或以上的任何人开放 —— 不仅限于学生和应届毕业生了。参与者通过编写软件获得报酬，其 [津贴](https://en.wikipedia.org/wiki/Stipend) 的金额取决于他们所在国家/地区的 [购买力平价](https://en.wikipedia.org/wiki/Purchasing_power_parity)。


**LCTT 译注：以往，这个活动只允许在校学生参与，今年条件放开，只需年龄 18+ 即可，对参与者的贡献时长要求也降低了，尽可能地让更多人参与进来。不过，今年的报名通道在 4 月 19 日就截止了，大家有兴趣的话明年可以关注一下。**


这也是 Zephyr 项目第一次作为 Linux 基金会的项目，参与到谷歌编程之夏中。让我们一起欢迎这些贡献者及其项目吧！


### 项目一：基于 Zephyr 的 Arduino 模块


1 个贡献者（350 小时）。


[Arduino](https://www.arduino.cc/) 是一个流行的框架，它为嵌入式设备编程提供了一个简化的接口。最近，Arduino 采用 mbed OS 作为其一些新设备的基础 RTOS。通过这项工作，他们将 [Arduino Core](https://github.com/arduino/ArduinoCore-API) 作为独立的抽象层，从 [Arduino Core for mbed](https://github.com/arduino/ArduinoCore-mbed) 中分离出来。这为在其他操作系统上利用 Arduino Core 开辟了可能性。


该项目的想法就是创建一个利用 Arduino Core 的 Zephyr 模块，以便开发人员在与 Arduino 兼容的设备上使用 Arduino 框架时，可以使用 Zephyr 作为底层操作系统。对用户的好处包括：


* 可以访问 Arduino API 以及高级 Zephyr 功能
* 得益于 Zephyrs 的设备支持，用户可以选择标准 Arduino 生态系统更广泛的设备
* 能够重复使用 Arduino 工具，如 Arduino IDE 和丰富的库


Arduino Core 使用 LGPL 许可证，Zephyr 使用 Apache 2 许可证。这意味着该项目的开发很可能需要脱离主分支，并在单独的仓库中进行，以保持代码和许可证分离。有关这方面的历史讨论，请参阅 [#22247](https://github.com/zephyrproject-rtos/zephyr/issues/22247)，有关 Arduino 核心架构之前的早期尝试，请参阅 [soburi/arduino-on-zephyr](https://github.com/soburi/arduino-on-zephyr)。


**贡献者的任务是：**


* 实现一个基于 Arduino Core 的准系统模块，可以为任何目标编译（不具备功能性，可能在 QEMU 中）
* 基于 Zephyr，使用 Arduino API 实现一个通用外围设备，例如 [Serial](https://www.arduino.cc/reference/en/language/functions/communication/serial/)
* 以一个物理板为目标，例如 Arduino Zero


**导师：**


[Jonathan Beri](https://www.linkedin.com/in/jonathanberi/) – Golioth 和 Zephyr TSC 的首席执行官 [Alvaro Viebrantz](https://www.linkedin.com/in/alvaro-viebrantz-55119048/) – Golioth 和 Google GDE 的创始工程师


**代码许可证：** LGPL


**贡献者详细信息：**


* 姓名：Dhruva Gole
* 项目博客：<https://dhruvag2000.github.io/Blog-GSoC22/>
* 项目海报：（题图）


**关于贡献者：**


![](/data/attachment/album/202207/12/102234y0kdkkki9j83nk99.jpg)


Dhruva 是一名电气工程专业的本科生。他的兴趣广泛，从嵌入式软件开发到硬件设计，在 SBC、微控制器和嵌入式 Linux 平台方面拥有丰富的工作经验。


### 项目二：Zephyr 的 Apache Thrift 模块


一个贡献者（350 小时）。


[Apache Thrift](https://github.com/apache/thrift) 是一个 [IDL](https://en.wikipedia.org/wiki/Interface_description_language) 规范、[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) 框架和代码生成器，它抽象出传输和协议细节，让开发者专注于应用逻辑。它适用于所有主流操作系统，支持超过 27 种编程语言、7 种协议和 6 种底层传输方式。最初，它于 [2007 年在 Facebook 开发](https://thrift.apache.org/static/files/thrift-20070401.pdf)，随后与 Apache 软件基金会共享。


![](/data/attachment/album/202207/12/102235wxg17ohiw8wko1kb.png)


![](/data/attachment/album/202207/12/102235ls9vxvcxsxrrr6b9.png)


在 Zephyr RTOS 中支持 Thrift 将使社区受益匪浅。它将带来新的软件和硬件技术、新产品以及云集成的其他方式。 Thrift 也可以用于几乎任何传输，因此，它是 Zephyr 支持的许多不同物理通信层的自然选择。该项目的想法是使概念验证 [Thrift for Zephyr 模块](https://github.com/cfriedt/thrift-for-zephyr) 形成以供上游使用。为此，贡献者必须：


* 对 Thrift 功能（协议、传输）执行额外的集成
* 使用 [supported board](https://docs.zephyrproject.org/latest/boards/index.html) 或 [Qemu](https://docs.zephyrproject.org/latest/guides/networking/qemu_user_setup.html) 编写其他示例应用程序
* 使用 [Zephyr 测试框架](https://docs.zephyrproject.org/latest/guides/test/ztest.html) 编写其他测试并生成覆盖率报告
* 确保模块遵循适当的 [编码指南](https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html) 并满足 [模块要求](https://docs.zephyrproject.org/latest/guides/modules.html)
* 将任何必要的改进贡献回 Apache Thrift 项目
* 将任何必要的改进贡献回 Zephyr 项目


**导师：**


* [Christopher Friedt](https://www.linkedin.com/in/christopher-friedt/) – Meta 的 SWE / ASIC FW 和 Zephyr TSC 成员
* [Stephanos Ioannidis](https://www.linkedin.com/in/stephanosio/) – Zephyr CXX 子系统维护者


**代码许可证：** Apache 2.0


**贡献者详细信息：**


* 姓名：Young


**关于贡献者：** Young 是一名通信工程专业的学生，他将攻读计算机工程硕士学位。他兴趣广泛，从前端开发到硬件设计，在 Web、IoT 和嵌入式平台方面拥有丰富的工作经验。2021 年他设计的一款搭载 RISC-V 64 处理器的低成本单板机被多家极客媒体报道。


本文 [Google Summer of Code + Zephyr RTOS](https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/) 首发于 [Linux 基金会](https://www.linuxfoundation.org/)。




---


via: <https://www.linux.com/news/google-summer-of-code-zephyr-rtos/>


作者：[The Linux Foundation](https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/) 选题：[lkxed](https://github.com/lkxed) 译者：[lkxed](https://github.com/lkxed) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
The **Google Summer of Code** (**GSoC)** is an international annual program in which [Google](https://en.wikipedia.org/wiki/Google) awards [stipends](https://en.wikipedia.org/wiki/Stipend) to contributors who successfully complete a [free and open source software](https://en.wikipedia.org/wiki/Free_and_open-source_software) coding project during the summer. Launched in 2005, GSoC takes place from May to August. Project ideas are submitted by host organizations involved in open source software development, though students can also propose their own project ideas.

This year, the program was opened to anyone 18 years or older – not just students and recent graduates. Participants get paid to write software, with the amount of their [stipend](https://en.wikipedia.org/wiki/Stipend) depending on the [purchasing power parity](https://en.wikipedia.org/wiki/Purchasing_power_parity) of the country where they are located.

This is also the first time the Zephyr Project is participating in GSoC under The Linux Foundation umbrella. Please join us in welcoming these contributors and their projects:

**Project #1: Arduino module based on Zephyr**

1 contributor full-size (350 hours).

[Arduino](https://www.arduino.cc/)’s popularity is renowned as a popular framework for providing a simplified interface to program embedded devices. Recently, Arduino adopted mbed OS as the base RTOS for some of their newer devices. With that work, they separated out [Arduino Core](https://github.com/arduino/ArduinoCore-API) as an independent abstraction layer from [Arduino Core for mbed](https://github.com/arduino/ArduinoCore-mbed). This opens up the possibility for leveraging Arduino Core on other OSes. The project idea is to create a Zephyr module that leverages the Arduino Core so that a developer can use Zephyr as the underlying OS when they use the Arduino framework on Arduino-compatible devices. The benefits to the user include:

Access to Arduino APIs as well as advanced Zephyr capabilities

Broader set of devices than the standard Arduino ecosystem thanks to Zephyrs’ device support

Ability to re-use Arduino tools like the Arduino IDE and wealth of libraries

Arduino Core is licensed under the GNU Lesser General Public License and Zephyr is licensed under Apache 2. That means this project will most likely need to be developed out of tree and in a separate repo to keep code and license separation. See [#22247](https://github.com/zephyrproject-rtos/zephyr/issues/22247) for a historic discussion & [soburi/arduino-on-zephyr](https://github.com/soburi/arduino-on-zephyr) for an earlier attempt prior to the Arduino Core architecture.

**The contributor’s task is thus:**

Implement a bare-bones Module based on Arduino Core that can compile for any target (no functionality, possibly in QEMU)

Implement a common peripheral from the Arduino API based on Zephyr such as [Serial](https://www.arduino.cc/reference/en/language/functions/communication/serial/)

Target one physical board, such as the Arduino Zero

**Mentors:**

[Jonathan Beri ](https://www.linkedin.com/in/jonathanberi/)– CEO of Golioth and Zephyr TSC

[Alvaro Viebrantz](https://www.linkedin.com/in/alvaro-viebrantz-55119048/) – Founding Engineer of Golioth and Google GDE

**Code License:** LGPL

**Contributor Details:**

Name: Dhruva Gole

Project Blog: [https://dhruvag2000.github.io/Blog-GSoC22/](https://dhruvag2000.github.io/Blog-GSoC22/)

Project Poster:

**About the contributor: **Dhruva is an undergraduate student [ majoring in Electrical engineering. He has a broad range of interests from embedded software development to hardware design and has experience in working on SBCs, microcontrollers, and embedded Linux platforms.](https://www.linuxfoundation.org/wp-content/uploads/dhruva.jpeg)

**Project #2: Apache Thrift Module for Zephyr**

1 contributor full-size (350 hours).

[Apache Thrift](https://github.com/apache/thrift) is an [IDL](https://en.wikipedia.org/wiki/Interface_description_language) specification,[RPC](https://en.wikipedia.org/wiki/Remote_procedure_call) framework, and code generator that abstracts away transport and protocol details to let developers focus on application logic.It works across all major operating systems, supports over 27 programming languages, 7 protocols, and 6 low-level transports. Originally [developed at Facebook in 2007](https://thrift.apache.org/static/files/thrift-20070401.pdf), it was subsequently shared with the Apache Software Foundation.** **

Supporting Thrift in the Zephyr RTOS would benefit the community greatly. It would lead to new software and hardware technologies, new products, and additional means for cloud integration. Thrift can be used over virtually any transport as well and for that reason, it is a natural choice for the many different physical communication layers supported by Zephyr. The project idea is to get the proof-of-concept [Thrift for Zephyr Module](https://github.com/cfriedt/thrift-for-zephyr) into shape for upstreaming. To achieve that, the contributor must:

Perform additional integration for Thrift features (protocols, transports)

Author additional sample applications using [supported boards](https://docs.zephyrproject.org/latest/boards/index.html) or [Qemu](https://docs.zephyrproject.org/latest/guides/networking/qemu_user_setup.html)

Author additional tests and generate coverage reports using the [Zephyr Test Framework](https://docs.zephyrproject.org/latest/guides/test/ztest.html)

Ensure the module follows appropriate [coding guidelines](https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html) and satisfies [module requirements](https://docs.zephyrproject.org/latest/guides/modules.html)

Contribute any necessary improvements back to the Apache Thrift Project.

Contribute any necessary improvements back to the Zephyr Project.

**Mentors:**

[Christopher Friedt](https://www.linkedin.com/in/christopher-friedt/) – SWE / ASIC FW at Meta and Zephyr TSC member

[Stephanos Ioannidis](https://www.linkedin.com/in/stephanosio/) – Zephyr CXX Subsystem Maintainer

**Code License:** Apache 2.0.

**Contributor Details:**

**Name: **Young

**About the contributor: **Young is a student majoring in communication engineering, and he will pursue his Master’s degree in computer engineering. He has a broad range of interests from front-end development to hardware design, and has experience in working on the Web, IoT and embedded platforms. A low-cost single-board computer with a RISC-V 64 processor designed by him in 2021 was reported by several geek media.

The post [Google Summer of Code + Zephyr RTOS](https://www.linuxfoundation.org/blog/google-summer-of-code-zephyr-rtos/) appeared first on [Linux Foundation](https://www.linuxfoundation.org/).