This repository provides no_std Rust examples for the M5Stack Atom Matrix board. The examples demonstrate how to interact with the device's LED matrix and other peripherals using Rust in a bare-metal environment.
Key Features:
no_stdSupport: Designed for embedded systems, avoiding the standard library.- Clear Examples: Step-by-step examples for common functionalities.
- Easy Setup: Comprehensive instructions for getting started.
Resources:
-
Clone the Repository:
git clone [https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git](https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git) cd m5stack-atom-matrix-rust-examples -
Build and Flash the
led_matrixExample:cargo build --release --example led_matrix cargo espflash flash --release --example led_matrix
-
Monitor Serial Output (Optional):
cargo espflash monitor
If you don't have Rust and the necessary tools installed, follow these steps:
-
Install Rustup:
- Visit rustup.rs and follow the installation instructions for your operating system.
-
Add the Nightly Toolchain:
rustup toolchain install nightly rustup default nightly
-
Add the Xtensa Target:
rustup target add xtensa-esp32-none-elf
-
Install
espup:cargo install espup
-
Install ESP-IDF:
espup install
- Follow the prompts to install the required ESP-IDF components.
-
Install
cargo-espflash:cargo install cargo-espflash
-
Verify Installation:
cargo espflash --version
-
Clone the Repository:
git clone [https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git](https://github.com/hahihula/m5stack-atom-matrix-rust-examples.git) cd m5stack-atom-matrix-rust-examples -
Connect the M5Stack Atom Matrix:
- Connect the device to your computer via USB-C.
-
Build and Flash Examples:
-
For example, to build and flash the
led_matrixexample:cargo build --release --example led_matrix cargo espflash flash --release --example led_matrix
-
-
Monitor Serial Output (Optional):
-
To view serial output:
cargo espflash monitor
-
led_matrix: Basic LED matrix control.- Build and flash:
cargo espflash flash --release --example led_matrix
- Build and flash:
Contributing
Contributions are welcome! If you have any examples or improvements, feel free to submit a pull request.
License
MIT

