Keyboard firmware implemented in Rust

Overview

flutterby-rs

Keyboard firmware implemented in Rust.

It doesn't do anything useful yet!

Building for atmega32u4 devices (ergodox-ez, feather32u4)

  • First build the cross compiler per these instructions: https://github.com/avr-rust/rust (this will take a couple of hours, but you only need to do it once)
  • Then build the examples from this repo:
$ XARGO_RUST_SRC=$HOME/avr-rust rustup run avr-toolchain \
     xargo build --target avr-atmega32u4 --release --verbose --examples

To flash it to the target device:

$ avr-objcopy target/avr-atmega32u4/release/examples/blink.elf -O ihex target/target.hex
$ avrdude -p atmega32u4 -U flash:w:target/target.hex:i -cavr109 -b57600 -D

There's a helper script for building and running a given example:

$ ./run.sh blink

This makes some assumptions about the location of the avr-rust source and which port my device is attached to.

Debugging Using simavr

You need to install simavr and avr-gdb for yourself. On the mac you can do this as a one-time setup:

$ brew install avr-gdb
$ brew install --HEAD simavr

(this may take a while as it may need to build gcc)

Then you can use the sim.sh script to run an example under the simulator. There's no GUI or other visual output for this, but it does start paused and waiting for you to attach with gdb.

In one window:

$ ./sim.sh blink
    Finished release [optimized + debuginfo] target(s) in 0.0 secs
 * You can connect to the sim using
avr-gdb target/avr-atmega32u4/release/examples/blink.elf -ex "target remote :1234" -tui
+ simavr -g -m atmega32u4 -f 8000000 -v -v -v -t target/avr-atmega32u4/release/examples/blink.elf
Loaded 2486 .text at address 0x0
Loaded 110 .data
avr_gdb_init listening on port 1234

Then in another window run the gdb command that it printed above:

$ avr-gdb target/avr-atmega32u4/release/examples/blink.elf -ex "target remote :1234" -tui
You might also like...
Token management program (vesting and mining) implemented in Anchor
Token management program (vesting and mining) implemented in Anchor

Deep Dive into Anchor by Implementing Token Management Program Author: @ironaddicteddog, @emersonliuuu [Updated at 2022.5.21] You can find the full co

k-mer counter in Rust using the rust-bio and rayon crates

krust is a k-mer counter written in Rust and run from the command line that will output canonical k-mers and their frequency across the records in a f

Experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code

Diplomat is an experimental Rust tool for generating FFI definitions allowing many other languages to call Rust code. With Diplomat, you can simply define Rust APIs to be exposed over FFI and get high-level C, C++, and JavaScript bindings automatically!

Aws-sdk-rust - AWS SDK for the Rust Programming Language

The AWS SDK for Rust This repo contains the new AWS SDK for Rust (the SDK) and its public roadmap. Please Note: The SDK is currently released as a dev

Rust + Yew + Axum + Tauri, full-stack Rust development for Desktop apps.

rust-yew-axum-tauri-desktop template Rust + Yew + Axum + Tauri, full-stack Rust development for Desktop apps. Crates frontend: Yew frontend app for de

A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator
A lightning fast version of tmux-fingers written in Rust, copy/pasting tmux like vimium/vimperator

tmux-thumbs A lightning fast version of tmux-fingers written in Rust for copy pasting with vimium/vimperator like hints. Usage Press ( prefix + Space

A command-line tool collection to assist development written in RUST

dtool dtool is a command-line tool collection to assist development Table of Contents Description Usage Tips Installation Description Now dtool suppor

Rust mid-level IR Abstract Interpreter

MIRAI MIRAI is an abstract interpreter for the Rust compiler's mid-level intermediate representation (MIR). It is intended to become a widely used sta

Migrate C code to Rust
Migrate C code to Rust

C2Rust helps you migrate C99-compliant code to Rust. The translator (or transpiler) produces unsafe Rust code that closely mirrors the input C code. T

Owner
Wez Furlong
Wez Furlong
A 3dprinter/cnc firmware framework powered by rust embassy

Printhor: The highly reliable but not necessarily functional 3D printer firmware If you are using this product or like the project, please ★ this repo

Carlos Barrales 26 Nov 15, 2023
Simple git/hg tui client focused on keyboard shortcuts

verco A simple Git/Hg tui client focused on keyboard shortcuts Screenshots Platforms This project uses Cargo and pure Rust stable and works on latest

Matheus Lessa Rodrigues 214 Dec 26, 2022
Cherry RGB Keyboard Library

Cherry RGB Keyboard Library Tested with Cherry Keyboard G80-3000N RGB (046a:00dd) Features Done Set LED animation Set single-/multi-color (rainbow) Se

null 10 Dec 20, 2022
Bongo Copy Cat wants to be involved in everything you do but instead just imitates you hitting your keyboard all day. After all it's just a cat.

Bongo Copy Cat Introduction Bongo Copy Cat wants to be involved in everything you do but instead just imitates you hitting your keyboard all day. Afte

Abhijeet Singh 4 Jan 23, 2023
A zsh histb browser using skim. Implemented in rust.

A zsh histb browser using skim. Implemented in rust.

Matthias Bilger 18 Nov 17, 2022
The Roguelike Toolkit (RLTK), implemented for Rust.

The Roguelike Toolkit (RLTK), implemented for Rust.

Amethyst Foundation 1.1k Jan 6, 2023
Nix binary cache implemented in rust using libnix-store

harmonia Build Whole application nix-shell --run cargo b C Library Wrapper around libnixstore nix-shell --run make Note: The makefile is only to pro

Helsinki Systems 84 Dec 24, 2022
Arduino Uno 9 axis acceleration sensor (BMX055) reader implemented in Rust.

Arduino Uno Accelaration reader in Rust Components Arduino Uno (Probably possible with other AVR microcontrollers) BMX055 (Japanese website) Datasheet

Katsu Uchiyama 3 Dec 15, 2022
This is a Pomodoro Clock implemented as a Zellij plugin.

Pomodoro Clock This is a Pomodoro Clock implemented as a Zellij plugin. It shows a Pomodoro time as well as current date time. Prerequisite You must i

Tw 15 Nov 14, 2022
An ND812 decoder implemented as part of the yaxpeax project

yaxpeax-nd812 an ND812 decoder implemented as part of the yaxpeax project, including traits provided by yaxpeax-arch. the ND812 is a 12-bit microcompu

iximeow 1 Jan 22, 2022