#micro-controller #bits #programming #collection #teensy #weensy #bobs

macro weensy-proc-macro

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

3 releases

0.1.2 Oct 22, 2023
0.1.1 Oct 22, 2023
0.1.0 Oct 22, 2023

#10 in #teensy

Download history 4/week @ 2024-02-18 39/week @ 2024-02-25 14/week @ 2024-03-10 1/week @ 2024-03-17 54/week @ 2024-03-31

69 downloads per month
Used in weensy

GPL-3.0 license

7KB
143 lines

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.

Dependencies

~300–750KB
~18K SLoC