v2.00-beta · C++ · RP2040 & RP2350

An operating system for microcontrollers.

RPCortex gives a Raspberry Pi Pico a shell, a filesystem, accounts, Wi-Fi, a package manager and over-the-air updates. On the RP2350 boards a package runs in a sandbox, so a bad one costs a command and not the board.

v1.0 “Vela” is the stable release: the MicroPython build, and the one to install if you want something finished. v2 is a beta, worth running on a spare board and not on anything you depend on. Why it moved to C++

Measured on a Pico 2 W

What is new in v2

190×vs v1, same workload

RPCMark scores 1.05 million at 230 MHz, against v1's 5,000 to 6,000 at the same clock. At the 150 MHz it starts at, about 700,000.

2 coresboth in use

Tasks run on either core. ps shows every one with its stack and CPU time, and kill stops one.

5 regionspackage sandbox

On RP2350 a package runs unprivileged. A bad pointer costs that command, not the board.

OTAand a way back

Update over Wi-Fi, checked against a checksum. The old firmware is kept, and update rollback puts it back.

What is in it

What it includes

Shell

Coloured prompt, history that survives a reboot, Tab completion. Pipe with |, chain with && and ||, redirect with >.

Both cores

v1 could not touch core 1 at all. Here an unpinned task lives on core 1 about 99% of the time.

Scripting and automation

Run commands at boot (startup) or on a timer (task), and write .rps scripts with variables, if and while.

Filesystem

littlefs in the format a v1 device already uses. ls, cd, cp, tree, df, and a USB drive to drag files on and off.

Accounts

Salted SHA-256 passwords, roles, per-user home directories, and a guided first run.

Wi-Fi and the network

Scan, connect, saved networks with sealed passwords, autoconnect. wget, curl, ping, nslookup, HTTPS.

Packages

Install by name from a repository, upgrade, remove. Compiled .app files that load at runtime, sandboxed on the RP2350.

Recovery

A black box that survives a reset. safeboot loads nothing. Three failed starts load nothing, then restore the saved firmware, and only then rebuild the filesystem. (Working since v2.01-beta.)

A sampling

Commands at a glance

What the shell gives you out of the box. The full reference is in the docs.

Filesystem

ls            # size and timestamp
tree /os      # recursive tree
rm -r /old    # or rm /logs/*.txt
df            # flash usage
download      # drag files over USB
edit notes.txt

Networking

wifi connect  # interactive
wget http://...
curl -I https://...
ping 8.8.8.8
nslookup example.com
update check

System

fetch         # system info
meminfo       # RAM, fragmentation
pulse set 250 # clock speed
mpu           # what the guard enforces
compat        # what this board supports
settings

Tasks and diagnostics

ps            # pid, core, stack, CPU
bg httpd      # in the background
kill 7
task add 60 ntp sync
service add httpd
logdump       # survives a reboot
Boards

Supported boards

Every result on this page came from a Pico 2 W. The other three build and pass the image checks and have not been booted yet. They have no package sandbox on RP2040: the protection regions cost more RAM than those boards have. v1 remains the answer on an ESP32-S3 until the port lands.

BoardFirmwareFilesystemPackage sandboxStatus
Pico 2 W855 KB1.75 MByesRun on hardware
Pico 2352 KB2.75 MByesNot booted yet
Pico W806 KB384 KBnoNot booted yet
Pico297 KB1.25 MBnoNot booted yet
Next

Next steps