7dd036a827b17ea5dcb89ea58601000ef828728f
Tools like simavr only handle `.text`. This also makes the output from objdump a little more obvious.
Barebones Rust and Cargo program for Arduino Uno
Features:
- Uses timer interrupts to blink the LED.
- Echos back characters sent via the built-in serial device.
The code is written completely in Rust and a small amount of assembly!
See also the official blink example, which makes use of some GCC-provided code.
High-level instructions
-
Install avr-gcc, avrdude, and picocom. For example, using Homebrew:
brew tap osx-cross/avr brew install avr-gcc avrdude picocomavr-gcc is used as the linker, avrdude uploads the finished code, and picocom is used as the serial terminal.
-
Compile the fork of Rust with AVR support and switch to it.
-
Configure Xargo:
export RUST_TARGET_PATH=$(pwd) export XARGO_RUST_SRC=/path/to/avr-rust/src -
Build the code:
make -
Upload the code:
make program -
Connect the serial terminal:
make connect-terminal
Description
No description provided
https://github.com/shepmaster/rust-arduino-blink-led-no-core-with-cargo
Languages
Rust
82.4%
Assembly
14.7%
Makefile
2.8%