ANN: Configurable bareboard tasking runtimes for RP2040

I have just released new light-tasking and embedded runtime crates for the RP2040.

What sets these apart from the Pico runtimes already distributed in gnat_arm_elf is that these runtimes are configurable via Alire’s crate configuration, the purpose being to make the runtime easier to tweak without needing to dig into the runtime sources (which isn’t always the friendliest of experiences). In particular, the following aspects are currently configurable via the crate config:

  • the number of Cortex-M0+ cores used by the runtime (1 or 2 cores);
  • which alarm IRQ is used by the runtime for task delays (useful for avoiding clashes if the alarm IRQ is needed for something else);
  • which board the runtime is configured for (e.g. the Pico, Pimoroni boards, AdaFruit boards, etc);
  • the clock configuration, so you can change the frequency at which the system runs; and
  • the interrupt stack sizes.

The cool thing about using the tasking runtimes is that it’s dead easy to write multicore programs for the Pico, since tasks can be pinned to a specific core using the CPU pragma/aspect. For example, to declare a task which runs on the second core:

task My_Task with CPU => 2;

See the GitHub link above for more info.

9 Likes