Oberon RTK

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

Purpose

Oberon RTK is a framework for writing 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

RTK stands for “real-time kernel”, that is, an embedded multi-threading kernel to allow to divide, and program, the controller program as set of separate control processes.

Oberon RTK is designed to run dual-core, multi-threaded programs.

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, the latest 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 RTK framework is being developed using the Astrobe series of compilers/linkers.

RP2040

As of November 2024, Oberon RTK programs for the RP2040 can be compiled and linked using the current versions (v9.3) of:

  • Astrobe for RP2040
  • Astrobe for Cortex-M0

RP2350

As of November 2024, Oberon RTK programs for the RP2350 can be compiled and linked 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 be 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 RP2040 (and, presumably, RP2350) create the UF2 binaries for the RPs, and can upload them directly via USB. The tools below can also be used for the corresponding .bin files.
  • Astrobe for Cortex-M0 and Cortex-M4 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.

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 the beginning of October 2024, the development focus was exclusively on the RP2040, with the support for the new RP2350 only starting now.
  • This website, as well as the GitHub repository, reflect that evolution:
    • this website’s contents is mostly about the RP2040, and the corresponding links to the GitHub repo point to the this first version of Oberon RTK;
    • supporting the additional MCU resulted in some structural changes in the repo, as outlined below;
    • migration of the modules from Oberon RTK v1 to v2 is underway, but will take some time, not least as the RP2350 is quite a different machine regarding capabilities and features;
    • this website will follow suit, step by step.
  • The first stage of the migration will focus on running RP2350 software in the Secure domain, with the extensions for also using the Non-secure realm 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-03.

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
  + v2: example programs for Oberon RTK v2, for Pico and Pico2
    + 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: MCU-specific modules
        + kernel-v1
        + kernel-v2
+ libv2: Oberon RTK framework library version 2
  + any: MCU/board-independent modules
  + board
    + rpi
      + any: any Raspberry Pi board
      + pico: Pico or compatible
      + pico2: Pico2 or compatible
  + mcu
    + rpi
      + any: any Raspberry Pi MCU
      + rp2040: MCU-specific modules
      + rp2350: MCU-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.