Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rust on Alarmo!
This project provides a convenient API to bootstrap firmware and access peripherals on the Nintendo Alarmo, using Rust.
Status
This started as a Rust port of GaryOderNichts's MIT-licensed alarmo repository, which uses the official hardware abstraction layer. As a proof-of-concept, I first made a Rust loader that would just call GaryOderNicht's implementation, then I incrementally rewrote each part in the Rust module.
Consider this list of goals tentative:
- It works!
- LCD frontend using the
display_interfacecrate - Better build environment (automate
objcopyand firmware signing) - Button inputs
- Dial input
- Dial LED
- Allocator with extended RAM
As a general goal, I'd like to use Rust-native HALs (e.g. stm32h7xx-hal) whenever possible. In its current state, the project still depends on the official HAL, for which it generates bindings using bindgen.
Usage
Running an example
- Compile the example, for example
lcd:
cargo build --example lcd
- Convert the example ELF into BINF:
arm-none-eabi-objcopy target/thumbv7em-none-eabihf/debug/examples/lcd lcd.bin
- Sign the firmware to get the
a.bin.
Creating a project
- After you've created the Cargo project, copy the
link.ldfile and.cargo/directory from this repository to the root of your crate. - Add the library as a dependency:
# With LCD support
# No LCD support
# Optionally, add some other dependencies for peripherals, see examples for details
# cargo add mipidsi
# cargo add embedded-graphics
- Build the project:
cargo build
- Convert the result ELF into BINF (change
debugtoreleasefor--release):
arm-none-eabi-objcopy target/thumbv7em-none-eabihf/debug/your_crate your_crate.bin
- Sign the firmware to get the
a.bin.
License
The library and its examples are dual-licensed under both Apache-2.0 and MIT. Please also refer to the license documentation for the official HAL.
Credits
- GaryOderNichts, whose project this repository is derived from, and for their blog post exploring the Alarmo.
- Spinda and hexkyz for their incredible work reverse-engineering the Alarmo!