Oberon RTK

Oberon Real-Time Kernel for Raspberry Pi's RP-series of microcontrollers.

Purpose

Oberon RTK is a framework for writing dual-core, multi-threaded embedded control programs in Oberon for the RP-series of micro-controllers of Raspberry Pi, using Astrobe’s cross-compiling IDEs.

  • RP2040: Cortex-M0+, ARMv6-M, Pico 1 board
  • RP2350: Cortex-M33, ARMv8-M, Pico 2 board

Oberon RTK provides an embedded multi-threading kernel to allow to divide, and program, the controller program as set of separate control processes.

The use of the kernel is not mandatory for the Oberon RTK library/framework in general, which can be used to program any kind of application using one or two cores.

Audience

This site is targeted at programmers with a good understanding of the RP microcontrollers, as well as writing control software in general. Oh, and some sense of exploring. At least for now, there are no Getting Started instructions, and no tutorials.

There are examples, though. Also, some example program descriptions contain a good amount of conceptual material and design considerations, which are explored in the corresponding program itself, complemented by the descriptions section. And of course there’s the source code in the repository.

The modules in the GitHub repository are provided “as is”, with the assumption that the reader knows how to build and upload the software using the tools as outlined below.

This site may not be completely up-to-date, or complete, with respect to the modules in the repository. Refer to the latter for the actual details and specifics. As the saying goes: “Debug only code, don’t get suckered in by the comments.” Or by websites.

Tools

The Oberon RTK framework is being developed using the Astrobe series of compilers/linkers.

RP2040/Pico

As of November 2024, Oberon RTK programs for the RP2040/Pico can be built using the current versions (v9.3) of:

  • Astrobe for RP2040
  • Astrobe for Cortex-M0

RP2350/Pico2

As of November 2024, Oberon RTK programs for the RP2350/Pico2 can be built using the current versions (v9.3) of:

  • Astrobe for RP2040
  • Astrobe for Cortex-M0
  • Astrobe for Cortex-M4

Astrobe for RP2350 is announced for Q4/2024.

Since the Cortex-M family of MCUs are upwards-compatible on instruction level, code generated with compilers/linkers for the RP2040 can basically run on the RP2350. The RP2350 has a different address map layout, though, and a few conceptual and implementation changes here and there compared to the RP2040, so the programs need to be recompiled using the library modules written for the RP2350. Of course, code generated with a compiler/linker for the RP2040 cannot take advantage of the full instruction set of the RP2350.

Note that the support for Astrobe’s M0 and M4 compilers may be temporary for now, allowing to experiment until the Astrobe variants for both RPs are fully established.

Here’s how to configure Astrobe.

Other

  • Astrobe for Cortex-M0, Cortex-M4, and RP2040 create .bin files, which can be transmogrified to UF2 and uploaded via USB using the tools described here.
  • Programmable IO (PIO) assembly code can be run through the pioasm assembler and made accessible from Oberon using pio2o.
  • Astrobe for RP2040 (and, presumably, for RP2350) directly creates the UF2 binaries for the RPx, and can upload them directly via USB.

Dependencies

The RTK modules depend on a few modules in the Astrobe library. Hence, you need to have a registered copy of one of the above IDEs. There may be free Starter Editions available.

Questions and Support

CFB Software has kindly granted permission to ask and answer questions related to this framework on the Astrobe forum. You can also e-mail me, or use the GitHub issue functionality.

Status and Current Work

  • Until October 2024, the development focus was exclusively on the RP2040, with the support for the new RP2350 only starting now.
  • Status as of mid November 2024:
  • The current work focuses on migrating more example code and the corresponding library modules, plus keeping this website somewhat current.

  • The current stage of the migration focuses on running RP2350 software in the Secure domain in privileged mode, with the extensions for also using the Non-secure realm possibly coming later. This also depends to some extent on the corresponding features by the forthcoming Astrobe compiler for the RP2350. As far as the capabilities of the two MCUs overlap, running in Secure privileged mode on the RP2350 corresponds to running on the RP2040.

Updates and Changes

Latest updates and changes: 2024-11-17.

Check out the Change Notes for all updates and changes.

Repository Structure

+ changes: change notes
+ config: configuration files for Astrobe [a]
  + v1: Oberon RTK version 1, for Astrobe for Cortex-M0
  + v2: Oberon RTK version 2, for Astrobe for RP2040, Cortex-M0, and Cortex-M4
+ examples
  + pico: example programs for Oberon RTK v1, for Pico
  + rpi: example programs for Oberon RTK v2, for Pico and Pico2
    + any
    + pico
    + pico2
+ lib: Oberon RTK framework library version 1
  + any: MCU/board-independent modules
  + board
    + rp2040: modules for RP2040-based boards
      + any: any board
      + pico: Pico or compatible
  + mcu
    + m0
      + rp2040: RP2040-specific modules
        + kernel-v1
        + kernel-v2
+ libv2: Oberon RTK framework library version 2
  + any: MCU/board-independent modules
  + board
    + rpi
      + any: any Raspberry Pico x board
      + pico: Pico or compatible board
      + pico2: Pico2 or compatible board
  + mcu
    + rpi
      + any: any Raspberry RPx MCU
      + rp2040: RP2040-specific modules
      + rp2350: RP2350-specific modules
+ tools: the tools [b]

The menus at the top are drop-downs, where applicable, but you can also click on the menu name item itself to get an overview page. The item on the top left-hand side is the home link.

On narrow mobile phone screens, the main menu itself is a drop-down, with no secondary drop-down from there. This would be awkward. Navigate via the overview pages in this case.

Licences

Please refer to section Licences.


  1. Euphemism for “quick hack”. ↩︎