Skip to content

Commit

Permalink
doc: update user guide
Browse files Browse the repository at this point in the history
Signed-off-by: HaoboGu <[email protected]>
  • Loading branch information
HaoboGu committed Nov 5, 2024
1 parent 2fbd1da commit ea6be5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions docs/src/user_guide/1_guide_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,3 @@ This guide aims to introduce you how to build your own keyboard firmware using R
- compile the firmware and flash

If you get any questions or problems following this guide, please fire an issue at <https://github.com/HaoboGu/rmk/issues>.

## Before we start

Using RMK requires basic knowledge of **Rust programming** and **embedded devices**. If you're not familiar with Rust, [The Official Rust Book](https://doc.rust-lang.org/book/) is a good start. And, if you're not familiar with embedded Rust, we recommend you to read [The Embedded Rust Book](https://docs.rust-embedded.org/book/) first. We'll keep working on making RMK more accessible for everybody.
14 changes: 7 additions & 7 deletions docs/src/user_guide/2_setup_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ RMK is written in Rust, so first you have to install Rust to your host. Installi

[Here](https://doc.rust-lang.org/book/ch01-01-installation.html) is a more detailed guide for installing Rust.

## 2. Choose your hardware
## 2. Choose your hardware and install the target

RMK firmware runs on microcontrollers. By using [Embassy](https://github.com/embassy-rs/embassy) as the runtime, RMK supports many series of microcontrollers, such as stm32, nrf52 and rp2040. Choose one of the supported microcontroller makes your journey of RMK much easier.

If you're using other microcontrollers, make sure your microcontroller supports [Embassy](https://github.com/embassy-rs/embassy).

## 3. Install your target
RMK firmware runs on microcontrollers. By using [Embassy](https://github.com/embassy-rs/embassy) as the runtime, RMK supports many series of microcontrollers, such as stm32, nrf52 and rp2040. Choose one of the supported microcontroller makes your journey of RMK much easier. In RMK repo, there are many examples, microcontrollers in examples are safe options. If you're using other microcontrollers, make sure your microcontroller supports [Embassy](https://github.com/embassy-rs/embassy).

The next step is to add Rust's compilation target of your chosen microcontroller. Rust's default installation include only your host's compilation target, so you have to install the compilation target of your microcontroller manually.

Different microcontrollers with different architectures may have different compilation targets, if you're using ARM Cortex-M microcontrollers, [here](https://docs.rust-embedded.org/book/intro/install.html#rust-toolchain) is a simple target list.

For example, rp2040 is a Cortex-M0+ microcontroller, it's compilation target is `thumbv6m-none-eabi`. Use `rustup target add` command to install it:


```bash
rustup target add thumbv6m-none-eabi
```

nRF52840 is also commonly used in wireless keyboards, it's compilation target is `thumbv7em-none-eabihf`. To add the target, run:

```bash
rustup target add thumbv7em-none-eabihf
```

## 4. Add other tools

Expand Down

0 comments on commit ea6be5a

Please sign in to comment.