Skip to content
Snippets Groups Projects
Commit 064b2b47 authored by zdmx's avatar zdmx :crab:
Browse files

Update README

parent 49d648ed
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,11 @@
This repo provides a pure-rust board support crate / runtime + drivers for the hardware on the badge
#### This is currently still very much WIP, will probably split up into a board support crate and a runtime crate tomorrow
> ## This is very much alpha, do not rely on completeness or stability
> This project is still WIP, many things do not work yet, and many are subject to change.
> See the list below for what works and what doesn't.
> If you want stability and feature-completeness, you should take a look at https://docs.flow3r.garden for info on the excellent C/MicroPython firmware.
> So with that out of the way, continue reading if you want to play with Rust on your badge!
## State of implementation
......@@ -19,6 +22,8 @@ This repo provides a pure-rust board support crate / runtime + drivers for the h
- [ ] Barometer: not implemented yet
- [ ] Audio: not implemented yet
If you are interested in implementing or testing one of the missing features, I am always happy for any help. Just open an issue or reach out via matrix (@zdmx:xatellite.space) or e-mail.
## Development setup
The hardware of the badge is based on the ESP32S3 which uses the Xtensa-Architecture. Xtensa is currently not supported in mainline LLVM/rustc, so we have to install the Espressif-forks of the toolchain.
......@@ -36,6 +41,28 @@ Make sure your cargo bin directory (usually `$HOME/.cargo/bin`) is in PATH.
`espup` will place a file called `export-esp.sh` in your Home-Directory which you need to source to activate the toolchain.
## Developing an app on top of flow3-rs
Additionally, you should install `cargo-espflash` for easy flashing
```
cargo install cargo-espflash
```
### Flashing
To flash from the official firmware to a Rust binary, you have to put your badge into bootloader mode by holding the left shoulder button during poweron. After a few seconds, a `Espressif USB JTAG/serial debug unit` should appear on the USB bus.
This is only nessecary when flashing from the official firmware to Rust, because the C firmware takes over the usb port.
When reflashing a Rust binary, you should not have to enter bootloader mode.
Now you can flash your code onto the badge using `espflash` by running
```
cargo espflash flash --monitor --release
```
which also immediately attaches to stdout of the badge.
If it does not attach after flashing from the official firmware to a Rust binary, restart your badge and try the flashing again.
The `--release` flag is optional, however some things (especially badgenet) might not work properly without it due to timing problems without optimizations.
## Further documentation / Apidocs
TBD
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment