Log data over a serial interface. There are two logging implementations for NXP's i.MX RT processors:
Built on the [imxrt-hal
] hardware abstraction layer for i.MX RT processors, version 0.3. Compatible with [log
] version 0.4.
See the documentation for recommended use-cases, implementation descriptions, and examples:
cargo doc --open
This crate supports all of the same i.MX RT variants as the [imxrt-hal
] crate. To see the supported i.MX RT variants, check the HAL's feature support list.
:information_source: As of this writing, the HAL only supports one i.MX RT variant, the
"imxrt1062"
. For convenience, the"imxrt1062"
feature is this crate's default feature. This default feature may change in future releases.
The table below describes the execution time for logging statements on a Teensy 4. For more information on the test setup, consult the crate documentation. See the two examples to reproduce the test.
| Logging Invocation | Execution Time, Blocking (us) | Execution Time, DMA (us) |
| ----------------------------------------------------- | ----------------------------- | ------------------------ |
| log::info!("Hello world! 3 + 2 = {}", 3 + 2);
| 3120 | 3.16 |
| log::info!("Hello world! 3 + 2 = 5");
| 3120 | 2.84 |
| log::info!("");
| 1220 | 2.36 |
| log::info!(/* 100 character string */);
| 9880 | 4.12 |
The crate's examples run on hardware. See the documentation at the top of each example for more information.
For examples that run on a Teensy 4, you'll need the build dependencies described in the teensy4-rs
project.
Use make
to build an example:
make t4_blocking
When building an example for the Teensy 4, the build will print the location of the *.hex
file. You may download the file to a Teensy using either the Teensy Loader Application or the teensy_loader_cli
command-line Teensy loader.
To run this crate's unit tests, and to check documentation examples, use make test
.
Licensed under either of
at your option.
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.