weensy

Crates.ioweensy
lib.rsweensy
version0.1.2
sourcesrc
created_at2023-10-22 19:31:49.696496
updated_at2023-10-22 21:45:01.747998
descriptionA collection of useful bits and bobs for programming the Teensy 4.1 microcontroller.
homepagehttps://github.com/speelbarrow/weensy.rs
repositoryhttps://github.com/speelbarrow/weensy.rs
max_upload_size
id1010774
size46,370
Noah Friedman (speelbarrow)

documentation

README

weensy.rs CI/CD Crates.io

A collection of useful bits and bobs for programming the Teensy 4.1 microcontroller using Rust.

NOTE: This package is meant to be used as an extension of teensy4-bsp. It is strongly recommended that you familiarize yourself with that library's API before using this package.

USAGE

This package should be used by an executable crate targetting the Teensy 4.1. The following configuration of cargo is required to build your executable properly:

[build]
target = "thumbv7em-none-eabihf"

[target.thumbv7em-none-eabihf]
rustflags = ["-C", "link-arg=-Tt4link.x"]

This code should be placed in <CRATE_ROOT>/.cargo/config.toml. It can also be passed directly to the cargo command using CLI flags, but this is not recommended because it's clunky.

See cargo's documentation for more details. The t4link.x file will be generated by teensy4-bsp's build.rs file. teensy4-bsp is included by this package, and thus the build script will run when building any crate importing this package. All feature flags for this package's dependencies are re-exported, and enables teensy4-bsp's rt feature by default.

Once this is done, cargo install cargo-binutils and then run the following in the root directory of your executable crate:

cargo objcopy --release -- -o ihex out.hex

You can then flash out.hex to your Teensy board using the Teensy's provided tools.

Commit count: 28

cargo fmt