Home

Awesome

RGB LED Matrix usage with the Cortex-M4 nRF52833

used elements

The test is done with the following elements:

Deployment

To deploy, you must set up the tools described in the Rust Discovery Book. Notably:

This project is already configured to be specifically deployed on the micro:bit v2. The memory map is notably prepared for the nrf52833 chip.

The project is current split in:

The Cargo Workspace cannot directly be build, due to some issues in mixing compilation targets (the library for ARMv7, and the utility for the local computer), you must go in each directory to launch the Cargo commands.

For instance, to build the library:

$ cd nrf52833_rgb_led_matrix
$ cargo build --release

Unless you need to debug, you must use the release version. The matrix needs frequent refreshes, which will be impeded by the unoptimized code version.

Some examples are also presents in the examples/ directory. To use them:

$ cargo embed --release --example hello_world_blink

Resources

What mainly helped me is:

Some additional related resources:

Development

Debug and logging

To debug and display some metrics, the logging feature can be enabled.

In order to display the logs using cargo embed, you can create a Embed.local.toml local file, and override some elements from Embed.toml to enable RTT.

[default.rtt]
enabled = true

Then you can recompile and inject the code by activating the logging feature:

$ cargo embed --release --features logging

Pre-commit hooks

Some git pre-commit hooks are available. You can install them using:

$ pre-commit install

Various notes

License

MIT License

Copyright (c) 2022, 2023 Vincent Hiribarren

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.