This is a minimalistic crate useful as a template for your own projects.
It comprises:
This is a crate useful as an introduction for bare metal programming. It targets the STM32F401re/STM32F11re Nucleo platform, but examples are mostly generic to any STMF4xx.
The set of examples covers.
-`bare0`, a minimal bare metal application in Rust. Here we will discuss in detail how the code is compiled into a binary, and how the genertad binary actually looks like in detail. We will also look at how the binary can be loaded onto the target MCU, and executed/debugged.
-`bare1`, extends the minimal example by *tracing* printouts to the host (over both `semihosting` and `ITM`).
-`bare2`, shows how raw access to *peripherals* is possible, and blink a LED. The problemen here is that its easy to make mistakes (and hard to find errors).
-`bare3`, here we develop a `C` like API for accessing register blocks in a structured way. Even though the programming API is offers some help to the progrmammer, it is still easy to make mistakes, (like writing to the wrong bit-field, or writing an illegal value).
-`bare4`, here we look at an API, machine generated from the vendors discription of the MCU. Using this API, bare metal programming becomes less error prone (fields are correctly aligned and values always in range).
- an `app!` system configuration with three task with two shared resources.
- the use of the `cortex-m-debug` crate for simple tracing over `itm` and `semihosting`