Posted in

谷歌推出 Pigweed SDK,用于 Pi Picos 和其他微控制器的嵌入式开发_AI阅读总结 — 包阅AI

包阅导读总结

1.

关键词:Google、Pigweed SDK、Embedded Development、Bazel、Microcontrollers

2.

总结:Google 推出 Pigweed SDK 用于嵌入式开发,以 Bazel 为核心,结合工具生态系统和编程库。它具有现代模块化特点,适用于中大型团队,已用于多种产品,支持跨平台,还与 Visual Studio Code 等集成。

3.

– Google 推出 Pigweed SDK 处于开发者预览阶段,旨在简化嵌入式 C++应用的开发、调试、测试和部署。

– 核心是 Bazel 构建系统,为适应嵌入式开发需求进行了扩展。

– 借助几年前推出的嵌入式编程库集合,并通过工具生态系统增强,包括 Clang/LLVM 工具链、交互式 REPL 等。

– Pigweed 采用现代模块化方法,降低调试和维护开销,适用于中大型团队,由多个独立模块组成,被广泛应用。

– 如 pw_presubmit 提供集成的代码检查器,pw_target_runner 并行运行测试等。

– SDK 帮助处理复杂工作流,支持跨平台,包括 macOS 和 Linux,Windows 支持即将到来。

– 包含 Sense 展示项目和与 Visual Studio Code 的集成。

– 还带来对 GitHub Actions 的支持。

– 树莓派与 Google 合作,为其 Pico 设备添加支持,Bazel 被认为是嵌入式软件开发的未来。

思维导图:

文章地址:https://www.infoq.com/news/2024/08/pigweed-sdk-pi-pico/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global

文章来源:infoq.com

作者:Sergio De Simone

发布时间:2024/8/12 0:00

语言:英文

总字数:536字

预计阅读时间:3分钟

评分:89分

标签:嵌入式开发,C++,谷歌,Pigweed SDK,微控制器


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

Recently launched by Google in developer preview, the Pigweed SDK aims to make it easier to develop, debug, test, and deploy embedded C++ applications. At the heart of the SDK lies Bazel, Google’s own build system, which has been extended to better support workflows and requirements typical of embedded development.

The Pigweed SDK leverages the Pigweed collection of embedded programming libraries that Google launched a few years ago and enhances it through a tool ecosystem that includes a Clang/LLVM toolchain, an interactive REPL, IDE integration, and more.

Pigweed’s modern and modular approach makes it easy to design applications with significantly reduced debugging and maintenance overhead, thus making it a perfect choice for medium to large product teams.

Used in Google Pixel, Nest thermostats, DeepMind robots, as well as satellites and autonomous aerial drones, Pigweed is composed of many independent modules developers can adopt separately. For example, pw_presubmit provides an integrated suite of linters that are pre-configured for microcontroller developers; pw_target_runner runs tests in parallel across multiple devices; pw_watch is a watcher that automatically creates an image when a file is modified, flashes it to the device, and verifies it by running the specific tests affected by the code changes.

The SDK helps embedded developers handle complex workflows such as hermetic building, flashing, and testing; structuring their codebases around hardware-agnostic C++; communicating with embedded hardware over RPC; and simulating Pico devices on a host computer. Cross-platform builds are supported on both macOS and Linux, with Windows support forthcoming.

One of the main contributions coming with the SDK is Sense, a complete showcase project. According to Google, Sense is a medium-sized project showing how a lot of Pigweed components work together. Sense is a simplistic air quality monitor that captures realistic flows such as integrating multiple inputs (sensors, buttons) and outputs (RGB LED), state machine management, and more. The Sense project is accompanied by a tutorial that provides a hands-on walkthrough of the codebase.

Also included is integration with Visual Studio Code with C++, Starlark code intelligence and out-of-the-box support for Bazel commands. Thanks to this module, Visual Studio Code provides code navigation, code completion, tooltips, errors and warnings, code formatting, and more, making it easier to use Pigweed modules.

Additionally, the SDK brings support for GitHub Actions, showing how to run a pre-submit action when a PR is sent and a post-submit action when the PR is finally merged. The actions involve checking out the code, installing Bazel, and building and testing the project, with an optional linter step.

Raspberry Pi has been working for almost a year with Google to add support for their Pico 1 and 2 devices to the Pigweed SDK.

Bazel is an important part of the Pigweed project, and the team believes it’s going to be the future of embedded software development, making it easier for large, professional embedded development teams to build prototypes and products on top of RP2350.

Pigweed SDK, in Google’s words, aims to become the best way to develop for the Pico family of devices, which are readily available today. This approach makes it possible to start prototyping quickly and easily and then target the Pigweed SDK to custom hardware without any major rewrite at a later stage.