Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Board, components and peripherals

The board, as shown earlier, is:

The board then, is the whole item. Its main parts are:

  • The printed circuit board (PCB): the flat fiberglass sheet underneath it all.
  • The components: modules on top of the PCB. They interconnect with traces which are thin copper wires. Examples of components: MCU, USB ports LEDs, Pins.
    • The microcontroller or microcontroller unit (MCU): the big square labelled ESP32-C6-WROOM (or some variant). It takes almost half the board. The MCU includes peripherals, CPU and RAM.
      • The peripherals are parts of the MCU including: GPIO, UART, I2C, SPI, WiFi, Bluetooth and others.

A nice explanation of how it all comes together is in the micro:bit v2 book:

Our MCU1 has 73 tiny metal pins sitting right underneath it (it’s a so called aQFN73 chip). These pins are connected to traces, the little “roads” that act as the wires connecting components together on the board. The MCU can dynamically alter the electrical properties of the pins. This works similarly to a light switch, altering how electrical current flows through a circuit. By enabling or disabling electrical current to flow through a specific pin, an LED attached to that pin (via the traces) can be turned on and off.

What is no_std?

This tutorial is “no_std”, but what does it mean? std can refer to:

  • std: the crate
  • std: the component, including the crates std, core, alloc among others.

This book distinguishes them precisely by adding the words crate and component, respectively.

The microcontroller has no Operative System, but std crate relies on one. Hence, #[no_std] is used in main.rs to indicate that std crate should be excluded.

To be precise alloc is excluded by default but can be added. A comparison is provided by this the table below, copied from the Rust Embedded Guide:

featureno_stdstd
heap (dynamic memory)*
collections (Vec, BTreeMap, etc)**
stack overflow protection
runs init code before main
libstd available
libcore available
writing firmware, kernel, or bootloader code

* Only if you use the alloc crate and use a suitable allocator like esp-alloc.

** Only if you use the collections crate and configure a global default allocator.

** HashMap and HashSet are not available due to a lack of a secure random number generator.


  1. Refers to a different MCU than ours but the concept is the same.