Release notes

Vela II Release Notes

v2.00-beta  •  Codenamed Vela II  •  The C++ rewrite  •  Beta pre-release; v1.0 “Vela” is still the stable one

The rewrite. RPCortex was MicroPython for four versions; this one is C++, and almost everything underneath is different even though the shell is deliberately familiar.

The headline

No interpreter

At 230 MHz (the clock v1's score was taken at) a Pico 2 W scores about 1.05 million on RPCMark against a v1 device's 5,000 to 6,000: roughly 190×. That is not a projection: bench runs the same workload as tools/bench.py does on v1, same iteration counts, so the two numbers are the same measurement taken twice. At the 150 MHz v2 starts at it scores about 700,000; the score follows the clock almost exactly.

One image, drag and drop

No firmware to flash and then files to paste on top of it. Hold BOOTSEL, drop a .uf2 and that is it. After that the device updates itself over the air.

On RP2350, a package cannot take the device down

The part with no equivalent in v1 at all. On RP2350 a package runs unprivileged, with the memory protection unit describing exactly five regions it may touch, and every pointer it hands the firmware range-checked against those regions.

The package…Costs you
Uses a bad pointerThe command. A report names it; the shell carries on.
Stops responding entirelyThe command. A timer takes the call back.
Runs out of its own stackThe command.
Asks for something that does not existNothing. The call is refused.
That last row sounds trivial and is not. havoc is a package built to attack the ABI from inside the sandbox: null pointers, pointers into flash, lengths that overflow, unterminated strings, handles that were never opened, and all 62 of its checks have to come back as clean refusals.

New in v2

  • Both cores. v1 could not use core 1 at all; MicroPython's heap is not safe across cores. An unpinned task here lives on core 1 about 99% of the time.
  • A task manager. ps shows pid, state, core, stack used against allocated, CPU time and where each task was started from. kill stops one. On v1 a misbehaving background service could only be found by rebooting.
  • Crash reporting that survives the crash. A log ring and a black box in memory the reset does not clear, so the next boot says what the last run was doing when it stopped. v1 lost everything on reboot.
  • A USB drive. download presents a real FAT volume, so files move by drag and drop in both directions instead of over the serial line.
  • Bluetooth. The same chip does both radios. v1 could not reach Classic at all (MicroPython's module is BLE only), so anything that plays audio was out of reach.
  • Real background work. v1's task run entered a foreground scheduler: you got scheduled tasks or an interactive shell, not both. Here the timer is just another task.
  • Interruptible everything. Ctrl+C stops any command instantly, because the interrupt check and the scheduler yield are the same call.
  • PIO, SPI and I2C for packages, which is what makes drivers possible without touching the firmware.

What matches v1

The filesystem commands down to ls's exact columns. Text processing. Accounts with salted SHA-256, roles and the guided first run. The shell: pipes, &&, ||, ;, redirection, quoting, history, thirty aliases. wifi with all its subcommands, ping, nslookup, ntp. startup, task, service, watch. The .rps scripting language, unchanged: scripts carry over as they are.

And the console itself: v1's tagged output, colours and boot banner, checked byte for byte against the original escape sequences.

Boards

BoardFirmwareFilesystemPackage sandbox
Pico 2 W855 KB1.75 MByes
Pico 2352 KB2.75 MByes
Pico W805 KB384 KBno
Pico297 KB1.25 MBno
The RP2040 images have not been booted. They build, both image checks pass on them, and the flash layout was verified by reading the constant back out of the compiled firmware, but no Pico or Pico W has run one. Every hardware result quoted here is from a Pico 2 W. That is what pre-release means, and it is the first thing worth confirming if you have one of those boards.

The RP2040 boards are back. v1.0 had to drop them because the multitasking build did not fit in 264 KB of RAM; without an interpreter it does. They hold 2 MB of flash against the RP2350's 4, so the firmware is built for size there and the filesystem is smaller, with wireless, Bluetooth, TLS and over-the-air updates all still in. What they do not get is the package sandbox: ARMv6-M protection regions are power-of-two sized and aligned to their own size, so the five a package needs cost more RAM than those boards have.

Installing

  1. Hold BOOTSEL and plug the board into USB.
  2. Drag the .uf2 for your board onto the drive that appears. Pick it from the Get page.
  3. Open a serial terminal at 115200 baud.

The first boot asks for a root password once. After that, update handles new releases over the air.

Upgrading from v1

v2 replaces the firmware entirely, so installing it removes MicroPython and everything stored under it. Save anything worth keeping first.

Scripts carry over. The .rps language is the same, and capture deliberately sees what a pipe would, so lines like capture n wc -l file behave identically on both.

Packages do not. A v1 .pkg is Python source and there is no Python in v2. The ones in the repository have been rewritten in C; a package of your own needs the same treatment. The package guide covers it.

Known limitations

  • Fewer packages than v1. Porting the rest is the main distance left to parity: the Packages page lists what is in the v2 index today.
  • SD cards are built but unproven. The card driver, a read-only FAT reader and the sd command are in the RP2350 images, and /sd goes through the same storage calls flash does. Everything above the wire is host-tested; none of it has been run with a card in the slot.
  • No ESP32-S3 yet. v1 runs there and continues to. The portable core moves unchanged, but the context switch, storage and network layers do not.
  • Cooperative scheduling. A task that never yields cannot be killed from the shell. There is a timer backstop for packages, not for firmware.
  • Bluetooth is uneven. An LE scan is confirmed on a Pico 2 W. Classic inquiry, bt advertise and playing audio to a speaker are all written and host-tested, but none has been confirmed against a real device yet.

RPCortex Vela II: v2.00-beta  •  by dash1101. Issues and PRs welcome. Earlier releases: v1.0 Vela · v0.9.1 Pulsar.