Git Product home page Git Product logo

flutterby-rs's Introduction

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

flutterby-rs's People

Contributors

wez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

flutterby-rs's Issues

Works for me

Issue for reporting works for me

So feel free to report your WfM, karma bonus points for adding extra information. ๐Ÿ˜ƒ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.