google / google/comprehensive-rust

Bare Metal "Raw MMIO" omits details

Open
#2,845 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
33.4k
Forks
2.1k
Avg merge
1d 3h
Merged PRs (30d)
10

Description

Thank you for this course; it's excellent.

I am following the "Bare Metal" section but encountered some noob issues that aren't (clearly?) documented.

I am following the course [here](https://google.github.io/comprehensive-rust/bare-metal/microcontrollers/mmio.html) rather than from the GitHub repo.

Perhaps that's one of my issues?

1. micro:bit v2 is referenced here but perhaps add a qualifier that this must be the v2 (and not the v1) because these use different MCUs (nRF52833 vs. nRF51822) and the code in the tutorials is specific to the nRF52833.
2. Referencing the GitHub repo, I created `.cargo/config.toml` and `Embed.toml` but the repo does not include nor mention the requirement to create a `memory.x` file in the root (see below)
3. `main.rs` includes `mod interrupts;` but this has not been referenced and appears to be redundant

`memory.x`:
```
MEMORY
{
/* nRF52833: 512KB Flash, 128KB RAM */
FLASH : ORIGIN = 0x00000000, LENGTH = 512K
RAM : ORIGIN = 0x20000000, LENGTH = 128K
}
```

Once these lessons were learned, the code compiles and deploys to the device!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.