2 个版本
0.1.1 | 2020年3月22日 |
---|---|
0.1.0 | 2020年1月4日 |
13 in #imxrt1062
用于 2 个crate(通过 imxrt1062-pac)
1MB
24K SLoC
teensy4-rs
Teensy 4.上的Rust开发crate集合。支持以下板卡
- Teensy 4.0
- Teensy 4.1
- Teensy MicroMod
API文档 (master
)
依赖项
-
Rust安装。使用
rustup
安装Rust。我们支持最新的稳定Rust工具链。 -
支持
thumbv7em-none-eabihf
的Rust目标,可以使用rustup
安装rustup target add thumbv7em-none-eabihf
-
一个强大的
objcopy
,可以将Rust可执行文件转换为十六进制文件。项目中的文档和工具使用由cargo-binutils
提供的LLVMobjcopy
。如果您想精确遵循此文档,请安装cargo-binutils
-
要将程序下载到您的Teensy 4,您需要构建
teensy_loader_cli
或Teensy Loader应用程序。后者可通过Teensyduino插件获得。
入门
使用我们的cargo-generate
模板,teensy4-rs-template
,基于这些库启动自己的teensy4-rs
项目
cargo install cargo-generate
cargo generate --git https://github.com/mciantyre/teensy4-rs-template --name hello-world
cd hello-world
cargo objcopy --release -- -O ihex hello-world.hex
将hello-world.hex
下载到您的Teensy 4!
请参阅Rust文档以获取API信息。特别是,请研究imxrt-hal
API,因为BSP将许多HAL接口转发
cargo doc --open
如果您想测试您的系统,请尝试此项目的examples
目录中的各种示例
贡献
我们欢迎支持!一种很好的贡献方式是开始使用crates来开发Teensy 4应用程序。提交一个问题来帮助我们识别错误、功能请求或文档空白。请参阅CONTRIBUTING.md,了解您请求的最佳问题跟踪器。
如果您想直接为teensy4-rs
项目做出贡献,请阅读CONTRIBUTING.md中的开发指南。
致谢与参考
- Teensy 4非常出色,这要归功于PJRC及其朋友们的辛勤工作。我们可以在Arduino插件中找到使用的Teensy代码这里。该代码极大地影响了这个库。
- Rust Cortex M团队,特别是
cortex-m-rt
crate。
许可证
许可协议为以下之一:
- Apache许可证,版本2.0 (LICENSE-APACHE或https://apache.ac.cn/licenses/LICENSE-2.0)
- MIT许可证 (LICENSE-MIT或https://open-source.org.cn/licenses/MIT)
供您选择。