README.md 1.21 KB
Newer Older
Astro's avatar
Astro committed
1
2
# Rust support for the card10 CCCamp15 badge

Danilo's avatar
Danilo committed
3
4
5
6
7
8
9
10
## Prerequisites

You need Rust Nightly and the arm-none-eabi-gcc toolchain, including libc.

### Arch Linux

    sudo pacman -S arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib

Astro's avatar
Astro committed
11
12
## Usage

Danilo's avatar
Danilo committed
13
You need Rust nightly. Use rustup or NixOS.
Astro's avatar
Astro committed
14

Astro's avatar
Astro committed
15
16
```shell
rustup update nightly
Astro's avatar
Astro committed
17
rustup override set nightly
Astro's avatar
Astro committed
18
19
20
21
22
23
rustup target add thumbv7em-none-eabi
```

Check out this repo's submodule (the C firmware).

```shell
Astro's avatar
Astro committed
24
25
cd example
cargo build --release
Astro's avatar
Astro committed
26
27
```

Astro's avatar
Astro committed
28
Then copy the resulting
Astro's avatar
Astro committed
29
`../target/thumbv7em-none-eabi/release/l0dable-example` to the badge
Astro's avatar
updates    
Astro committed
30
31
in USB Mass Storage mode in the `/apps/` subfolder. Don't forget to
rename with the `.elf` extension!
Astro's avatar
Astro committed
32

Astro's avatar
Astro committed
33
34
35
36
37
38
39
40
41
42
43
44
## Crates

| Crate    | Description                                               |
| ----     | ---                                                       |
| card10   | Helpers for implementing custom firmwares                 |
| example  | l0dable example                                           |
| l0dable  | Helpers for building l0dables                             |
| max32665 | Peripheral Access Crate for implementing your own drivers |
| watchapp | Sample firmware                                           |

## TODO

Astro's avatar
Astro committed
45
- arkanoid
Astro's avatar
Astro committed
46
- [ ] alloc