Skip to content

Latest commit

 

History

History
19 lines (11 loc) · 1.49 KB

rtic_distributions.md

File metadata and controls

19 lines (11 loc) · 1.49 KB

RTIC distributions

Definition

An RTIC distribution is a rust crate that exposes the RTIC attribute proc-macro implemented for a specific hardware architecture, or for a specific micro-controller, or even for a specific target use case (with non-standard syntax). For example, we could have a distribution for single core cortex-m devices, another distribution specifically tailored for the multicore RP2040, a distribution for risc-v architecture ... etc.

The responsibility for a distribution crate is to:

  1. Implement the low level hardware specific details and provide/bind that to the hardware agnostic RTIC compilation passes.
  2. Integrate a selection of compatible Compilation passes and optionally expose them to the user as a set of features which the user can select to enable.
  3. Expose the RTIC proc macro generated by RticMacroBuilder after performing the previous two steps

stack

Distributions allow the RTIC code-base growth more controllable and provides an alternative approach to the older approach in which all the hardware specific details all belong to a single crate maintained by the RTIC team, and users choose an implementation for some specific hardware is chosen by enabling a corresponding rust feature for their target hardware.

How to implement a distribution using rtic_core::RticMacroBuilder?

todo: provide short example and link to template distro