solar car's fork of teensy4-rs
  • Rust 99.6%
  • Dockerfile 0.4%
Find a file
Rhys Winslett 253449a70e
Some checks failed
Code Checks / format (push) Has been cancelled
Publish Documentation / doc (push) Has been cancelled
Check Template / template (push) Has been cancelled
Code Checks / clippy (push) Has been cancelled
Code Checks / test (push) Has been cancelled
Code Checks / xplat (macos-latest) (push) Has been cancelled
Code Checks / xplat (ubuntu-latest) (push) Has been cancelled
Code Checks / xplat (windows-latest) (push) Has been cancelled
Code Checks / doclinks (push) Has been cancelled
Can Support?
2026-02-17 03:43:19 +00:00
.cargo Rename the runner tool 2024-07-16 13:18:24 -04:00
.github Remove the USB logger 2024-05-23 10:13:45 -04:00
docker Update docs and automation 2020-06-19 21:29:31 -04:00
examples Can Support? 2026-02-17 03:43:19 +00:00
src Can Support? 2026-02-17 03:43:19 +00:00
teensy4-fcb Consolidate imxrt-rs dependencies into workspace 2024-11-11 09:14:48 -05:00
teensy4-panic Fix clippy warnings 2025-07-31 08:06:09 -04:00
teensy4-pins Consolidate imxrt-rs dependencies into workspace 2024-11-11 09:14:48 -05:00
tools Rename the runner tool 2024-07-16 13:18:24 -04:00
.gitignore Add licenses to pins, fcb crates 2020-10-16 09:11:59 -04:00
build.rs Add optional environment overrides for stack, heap 2024-04-05 07:41:29 -04:00
Cargo.toml Can Support? 2026-02-17 03:43:19 +00:00
CHANGELOG.md Added lpuart5 and lpuart7 2025-02-22 11:59:13 -05:00
CONTRIBUTING.md Fix link in CONTRIBUTING.md 2025-07-30 15:26:30 -07:00
LICENSE-APACHE Update licenses texts 2020-11-28 18:26:32 -05:00
LICENSE-MIT Update licenses texts 2020-11-28 18:26:32 -05:00
README.md Add MicroMod pins, BSP support for MicroMod boards 2023-02-08 17:17:37 -05:00

teensy4-rs

A collection of crates for Rust development on the Teensy 4. Supports the following boards:

  • Teensy 4.0
  • Teensy 4.1
  • Teensy MicroMod

Code Checks crates.io docs.rs

API Docs (master)

Dependencies

  • A Rust installation. Install Rust using rustup. We support the latest, stable Rust toolchain.

  • The thumbv7em-none-eabihf Rust target, which may be installed using rustup:

    rustup target add thumbv7em-none-eabihf
    
  • A capable objcopy for transforming Rust binaries into hex files. The documentation and tooling in the project uses the LLVM objcopy provided by cargo-binutils. Install cargo-binutils if you want to precisely follow this documentation.

  • To download programs to your Teensy 4, you'll need either a build of teensy_loader_cli, or the Teensy Loader Application. The latter is available with the Teensyduino add-ons.

Getting started

Use our cargo-generate template, teensy4-rs-template, to bootstrap your own teensy4-rs project based on these libraries:

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

Download hello-world.hex to your Teensy 4!

See the Rust documentation for API information. In particular, study the imxrt-hal APIs, since the BSP forwards many of the HAL's interfaces:

cargo doc --open

Try the various examples in this project's examples directory if you'd like to test your system.

Contributing

We welcome support! A great way to contribute is to start using the crates to develop Teensy 4 applications. Submit an issue to help us identify bugs, feature requests, or documentation gaps. See CONTRIBUTING.md to learn about the best issue tracker for your request.

If you want to directly contribute to the teensy4-rs project, read the development guidance in CONTRIBUTING.md.

Acknowledgements and References

  • The Teensy 4 is wonderful, and that's thanks to the hard work of PJRC and friends. We can find the Teensy code used in the Arduino plugins here. The code greatly influenced this library.
  • The Rust Cortex M team, specifically the cortex-m-rt crate.

License

Licensed under either of

at your option.