Shop OBEX P1 Docs P2 Docs Learn Events
Propeller 2 Berry VM — Parallax Forums

Propeller 2 Berry VM

Hey everyone,

I’ve been working on a new port/VM of the Berry scripting language for the Propeller 2, and I think it’s finally at a point where it’s ready for more people to start playing with and stress testing.

Current release:
https://github.com/speccy88/berry/releases/tag/v0.9.4

The binaries are available in the Assets section of the release page.

For anyone who doesn’t know Berry yet, it’s a really lightweight embedded scripting language that is very close to Python in feel and syntax, but designed specifically for constrained embedded systems. The VM is tiny, RAM usage is low, and it’s surprisingly capable for small microcontrollers.

That makes it a really interesting fit for the Propeller 2.

Berry official docs:
https://berry-lang.github.io

One thing I really like about Berry is that it keeps the scripting experience simple and familiar without needing MicroPython-level resources. It has:

  • dynamic typing
  • classes / objects
  • closures
  • lists/maps
  • modules
  • garbage collection
  • bytecode VM
  • native C bindings / FFI
  • optional solidification into flash/ROM

The core interpreter is extremely small compared to many scripting environments, which leaves more room for actual application code on the P2.

If you want to try it, I’d recommend starting with the Berry quick intro here:
https://berry.readthedocs.io/en/latest/source/en/Berry-in-20-minutes.html

After going through that, you can check out the Propeller 2 feature tour / examples included with the port to see the P2-specific functions and hardware integration.
https://github.com/speccy88/berry#p2-feature-tour

So far, the port already supports a pretty decent amount of functionality from the upstream Berry VM and I’m continuing to expand it.

The goal is to make the P2 a fun interactive scripting platform while still keeping access to the hardware features that make the Propeller unique.

I’m very open to feedback, bug reports, feature requests, and ideas. If something crashes or behaves strangely, please open an issue on the repo.

Sign In or Register to comment.