This example program implements the mandatory “blinker”, however using two cores (hence: “plus” :). Since there’s only one LED on the Pico, one of the cores simply periodically writes a message to its terminal in lieu of blinking a LED.

After 20 seconds, both programs cause a run-time error to demo the runtime-error handling, separate on either core. Comment out the corresponding lines to enjoy continuous blinking and messaging. :)

Running two programs on the RP2040’s core is really simple. Basically.

The programs for the two cores can be implemented in one module, or two. They are just parameterless procedures. The example uses two modules, BlinkPlusC0 and BlinkPlusC1, just to show this possibility. Not that it’s needed considering the complexity. :) Using two modules for two programs allows to test them independently on core 0.

All library modules of Oberon RTK are re-entrant. If you use your own, make sure they are as well, in case both cores use the corresponding code.

See Text Output and Input about the implementation of module Out for two cores.

Output Terminals

See Set-up, two-terminal set-up.

Build and Run

Build module BlinkPlusC0 with Astrobe, and create and upload the UF2 file using abin2uf2.

Set Astrobe’s memory parameters as listed, and the library search path as explained.