Google Summer of Code Project - Parrot on RTEMS

Bob Kuo bobjkuo at gmail.com
Thu May 27 14:49:17 UTC 2010


Below is from http://blog.bobkuo.com/2010/05/beginning-parrot-on-rtems/
which introduces my GSoC project to get Parrot to compile on RTEMS, a
real-time OS targeting embedded systems.

Please feel free to email me directly if you have any questions.

- Bob

My proposal for porting Parrot to RTEMS was accepted for the Google
Summer of Code! Though it’s a little late, this post will introduce
and explain what I’ll be doing.

Parrot
Parrot is a virtual machine designed with dynamic languages in mind.
Historically, Parrot started out as the virtual machine for Perl 6
Rakudo, but now it has many languages (or "High Level Languages" or
"HLLs") being actively developed to run on top of the virtual machine.
Parrot comes with a number of tools to make implementing new languages
easier – the Parrot Compiler Tools. Like other VMs, Parrot can compile
down to platform independent bytecode (called PBC). Parrot was
designed with “HLL Interop” in mind – to quote the docs,

Parrot is also designed to provide interoperability between languages
that compile to it. In theory, you will be able to write a class in
Perl, subclass it in Python and then instantiate and use that subclass
in a Tcl program.

How cool is that? That means progress for one HLL is progress for all.
Any optimization to the underlying architecture is an optimization for
every HLL. Any low-level bindings will automatically work for all
HLLs.

RTEMS
RTEMS stands for Real-Time Executive for Multiprocessor Systems. It is
a real time operating system designed for embedded systems. RTEMS is
free and open source and POSIX (1003.1b API) compliant. RTEMS comes
with a full ANSI C, ANSI C++ (with STL), and ADA support. RTEMS has a
full TCP/IP stack as well as other networking features like HTTP
servers and support for RPC. Finally, RTEMS has full debugging support
through GDB.

RTEMS is cross-compiled – that means the programmer might be on an x86
architecture but compile programs to run on Sparc. RTEMS currently
supports 116 hardware configurations ("Broad Support Packages" or
"BSPs") on a number of chip architectures (x86, ARM, Sparc) which can
all co-exist on the same development machine and run with the same
development code.

Potential
I think the potential here is staggering – not only does RTEMS get new
languages to target the hardware, Parrot gets new platforms to test
and run on. Someone could write something in Rakudo Perl using classes
from other languages like Python or Ruby or Tcl, compile to bytecode
and then be run on a hundred or so different hardware configurations.

Current Work
Of course it’s not all puppy dogs and ice cream – there’s work to do!
Things don’t quite work yet, but by the end of the summer I hope to
have Parrot’s bleeding edge building on RTEMS and running the test
suite on the BSPs. I’ll update this blog once a week with my progress
after my Tuesday meeting with my mentors at the Parrot Foundation and
RTEMS. The first work that needs to get knocked out:

1 - Hints Makefile – This Makefile will extract all the BSP
information necessary for compiling Parrot and then generate a hints
file that will be used by Parrot at compile time.

2 - Cross compilation support for Configure.PL – We need to be able to
specify which platform we want to target at compile time for Parrot.
Currently Configure.PL figures this out automatically by checking the
system that we are running, but with cross-compilation the system we
are running is not the system we are targeting.


More information about the parrot-dev mailing list