百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
E

esp-pacs

> 编程语言
开源

适用于 Espressif SoC 和模块的外围接口盒

181 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

适用于 Espressif SoC 和模块的外围接口盒

esp-pacs

Peripheral Access Crates (PACs) for Espressif SoCs and modules.

For information on how to use these crates, please refer to the svd2rust documentation.

Getting Started

We ask that you please read each of the below sections prior to contributing to this repository.

xtask

The xtask package is a binary application, based on the workflow outlined by cargo-xtask, which provides some simple utilities which make it easier to work with this repository. It is primarily used for patching SVDs and re-generating the PACs, but also provides some other functionality.

Usage: xtask 

Commands:
  html          Generate a webpage for a given SVD file
  patch         Patch the specified package(s)'s SVD file
  generate      Generate the specified package(s)
  build         Build the specified package(s)
  bump-version  Bump the version of the specified package(s)
  publish       Published the specified package(s)
  help          Print this message or the help of the given subcommand(s)

Options:
  -h, --help  Print help

This application can be found in the xtask/ directory in the root of the repository.

Patching the SVDs

svdtools is used to patch the SVDs rather than modifying the files directly. This makes it easier to upstream the changes to the official SVDs, which is done periodically, and then subsequently update the base SVDs here. A full description of the patching format is available in the svdtools README.

Patching is accomplished using the xtask package's patch subcommand. The patch subcommand accepts zero or more arguments:

  • If zero arguments are provided, it will patch all PACs in the repository
  • If one or more arguments are provided, it will patch each specified PAC

In order to apply patches to one or more chips' SVDs, from the repository's root directory you can run:

bash
# Only patch the ESP32-C3's SVD:
cargo xtask patch esp32c3
# Patch the SVDs for the ESP32, ESP32-S2, and ESP32-S3:
cargo xtask patch esp32 esp32s2 esp32s3
# Patch all the SVDs!
cargo xtask patch

Generating the PACs

PACs are also generated using an xtask subcommand, this time the generate subcommand. Again, the generate subcommand accepts zero or more arguments:

  • If zero arguments are provided, it will patch and (re-)generate all PACs in the repository
  • If one or more arguments are provided, it will patch and (re-)generate each specified PAC

In order to apply re-generate to one or more chips'SVDs, from the repository's root directory you can run:

bash
# Only generate the ESP32-C3's PAC:
cargo xtask generate esp32c3
# Generate the PACs for the ESP32, ESP32-S2, and ESP32-S3:
cargo xtask generate esp32 esp32s2 esp32s3
# Generate all the PACs!
cargo xtask generate

Note: It's also possible to build the PACs after patching and generating them, using the build subcommand instead of generate. This otherwise works the same as the process described above, but confirms that all generate source files build successfully. It's a good idea to do this prior to opening a pull request.

Opening a Pull Request

Prior to opening a pull request, we ask that you please:

  • Ensure that all required files have been commited
    • This include patch files (YAML), Rust source files, and (only sometimes) the device.x linker script
    • Please do not force add files to your commits; if a file is ignored in .gitignore it should not be included!
  • Ensure that you are able to patch, generate, and build each PAC using the xtask package

MSRV

The Minimum Supported Rust Version is 1.76.0 for all packages.

Note that targeting the Xtensa ISA currently requires the use of the esp-rs/rust compiler fork, which can be installed using esp-rs/espup.

RISC-V is supported by the official Rust compiler.

License

Licensed under either of:

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustesp32riscvrustxtensa

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言