Pycorn 0.05

Pycorn is an interpreted operating system written in Python.
Pycorn is an interpreted operating system written in Python, intended to recreate the easy learning possibilities of 8-bit microcomputers. Device drivers, network protocols, file systems can all be implemented in Python with no C or assembler code.

The goal of the project is to create a usable interpreter-centric OS environment with the capabilities of modern computers; allowing a smooth learning curve from the acquisition of basic programming skills right up to implementing new OS-level functionality and drivers. Performance is not a goal, though it would be nice. Current development is targeted at a variety of ARM platforms due to the relative simplicity of the hardware.

Pycorn currently uses devkitARM to build python, part of wintermute's excellent devkitpro project ( devkitARM includes a cross-compiling gcc targetted at generic ARM platforms, a build of the newlib embedded C library, and wintermute's libsysbase file IO abstraction library. This provides enough 'stuff' to compile the python interpreter into a library.

To actually make a bootable image a linkscript and crt0 are required which are implemented by pycorn. These are platform specific: the link script currently uses physical addresses and thus must be adjusted per target, and the crt0 is written in assembly to do things like stack setup. Right now we only have them for Marvell's PXA270 system-on-chip, as used in the Gumstix Verdex development board ( This board can be simulated by QEMU. A main program entry point is also required which invokes the python interpreter with some arguments, and though this is written in C it is portable.

Of course, it won't actually do anything visible; newlib has no actual IO facilities. A platform-specific serial driver is used for now, hooked up to libsysbase's stdin/stdout/stderr handles.

And.. that's it for now. There is no way to import any modules which aren't built into the interpreter as all file access fails right now, and Python's builtin readline is really stupid so you can't even backspace.. but it works!


0) Download devkitARM from and unpack it somewhere. Add devkitARM/bin to your PATH. You should now be able to run arm-eabi-gcc and friends.

1) Add the makepp directory in the pycorn source tree to your PATH. makepp is a nice make replacement with lots of nifty features; used primarily because I hate make's handling of subdirectories. See for their project page.

2) Install u-boot's mkimage utility. This is in Debian as package "uboot-mkimage", or you can compile it from u-boot's source.

3) Run "makepp hello/hello.uimage". This is a "hello world" program which should load into u-boot and print on the default platform serial port.

4a) If you have an actual Gumstix Verdex board you should be able to load this by serial, tftp, or MMC, and execute it with bootm.

4b) If you don't, you can simulate it under QEMU by doing "makepp hello/run", assuming you have QEMU installed. The bootloader will be configured automatically so it should just run. Hit C-a x (C-a a x under screen) to kill QEMU.

last updated on:
May 24th, 2010, 19:22 GMT
license type:
GPL (GNU General Public License) 
developed by:
Torne Wuff
ROOT \ System \ Operating Systems \ Other
Download Button

In a hurry? Add it to your Download Basket!

user rating



Rate it!
What's New in This Release:
  • Only the minimum amount of Python code is built into the binary itself; other modules are imported from a zipfile loaded as a ramdisk. The contents of the zipfile can be edited and rebuilt without requiring a compiler.
read full changelog

Add your review!