pymite /

Filename Size Date modified Message
357 B
68.5 KB
3.1 KB
1.5 KB
6.1 KB
2.9 KB
featuring PyMite

:Author:    Dean Hall
:Copyright: Copyright 2003, 2006, 2007, 2009, 2010 Dean Hall.
            See `License`_ for details.
:Release:   09
:Id:        $Id$


Python-on-a-Chip (p14p) is a project to develop a reduced Python virtual machine
(codenamed PyMite) that runs a significant subset of the Python 2.6 language
on microcontrollers without an OS.  The other parts of p14p are the device
drivers, high-level libraries and other tools.  Please join the
`python-on-a-chip google group`_ to discuss this project.

.. _`python-on-a-chip google group`:


See the LICENSE_ file to understand the terms of licensing
for each component of the Python-on-a-Chip program.

The Python-on-a-Chip program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of



P14p is built, for most platforms, using a POSIX-like terminal, a Makefile
(or using SCons) and a GCC [cross] compiler.  The posix64 platform is the 
default target platform and it builds for Mac OS X, Linux or Cygwin.

GNU Make should be installed since other forms of Make aren't 100% compatible.
The development system should have installed the
`GNU Compiler Collection`_ version 3.4 or later and `Python`_ 2.6.
The SCons build system is experimental.
Please read ``docs/src/BuildSystem.txt`` for more details.

To build p14p for the posix64 platform and run the interactive prompt::

    $ scons
    $ src/tools/ --desktop
    ipm> print "Hello world."
    Hello world.
    ipm> ^D

Press Control+D when done with the interactive prompt.
To run the system tests on the desktop::

    $ scons check

To cross-compile for a different platform, type ``scons PLATFORM=<plat>``
where ``<plat>`` is the name of a subdirectory in ``src/platform/``.
For example::

    $ scons PLATFORM=avr

The author uses avr-gcc to compile for Atmel AVR microcontrollers.
Other platforms use other compilers.  The windows platform uses a MicroSoft IDE.

Since p14p is so deeply embedded, it does not rely on many libraries.
For example, the avr platform needs only avr-libc and the econotag platform
requires newlib but also uses libmc1322x for advanced wireless features.

.. _`GNU Compiler Collection`:
.. _`Python`:


Please browse the `Python-on-a-chip project`_ site for up-to-date information.
and join the `Python-on-a-chip maillist`_ for discussion about the p14p project.

.. _`Python-on-a-chip project`:
.. _`Python-on-a-chip maillist`:


My personal thanks go out to these people for their recent contribution to p14p:

- Tonio Monnet: maintaining the tool

- Oscar Lindberg: Porting p14p to the MoSync platform.
- Alex Litz: Reported an error on the windows platform.
- Tonio Monnet: Recommended to use 'const' for the native func table to save RAM, enhancements to src/tools/
- Michael (michaelnt): Reporting mbed sys.time() and including a patch.
- Angus Gratton: enhancements to lib/avr, port to Teensy++
- J.W. Bruce: Reporting build issue and provided fix.
- Michael (xinx): Found mbed name conflict, reported PySerial issue in ipm and provided fix, reported error in the porting document, donated code to allow hex string formatting.
- Michael Reithinger: Reported GC defects and provided fixes.
- Davide Carboni: Reported a build break, implemented module loading in ipm.
- Markus Gritsch: Feedback on PIC port and ipm docs.
- Bryan Jones: Making Doxygen docs, developing port to PIC24/dsPIC33 platform, mainlining VM bug fixes and helping the windows port.
- Trammell Hudson: Patches for string concatenation and backtick operator (UNARY_CONVERT).
- Duncan McGreggor: Creating an excellent Python-on-a-Chip logo.
- Jan Wedel: Reporting an issue and providing a fix for the DELETE_ATTR bytecode.
- Tyler Wilson: Porting and maintaining p14p on the Windows platform and making good VM improvement suggestions.
- Thomas Fenzl: Patching and testing for 64-bit systems.
- Alex Clausen: Reporting a build break and including a patch for 64-bit systems.
- James Snyder: Porting and maintaining p14p on the STM32 platform.

Target Platforms

Platforms in **bold** are new since the previous release:

    - posix: Mac OS X, Linux, Cygwin or any other Posix-like desktop OS
    - **posix64**: Mac OS X, Linux, Cygwin or any other 64-bit Posix-like desktop OS

Release Notes

This is release 10

    - JT: Created issues and patches for ipm, mbed and

Older releases:

* Release 09, 2010/09/21

    For a complete list of changes for this release, `go here`_.
    Added support for the following major new features:

        - Classes with multiple inheritance
        - Generators with iterators, expressions and coroutines
        - String concatenation using the addition operator '+'
        - Migrated to Python 2.6 compiler and bytecodes
        - The backtick operator (s=`x`) for integers and floats
        - String format (%) using %d,s,f format chars
        - Closures. Also allows decorators with an argument
        - The Bytearray class: packet = bytearray(128); b = bytearray(b"abc")


        - Improved appearance of ipm
        - Fixed three nasty defects in the Garbage Collector
        - Improved readability of exception tracebacks for some platforms
        - Moved native function tables to "const" to save RAM
        - Added iter() to builtins (commented out)
        - Fixed string.count and string.find

* Release 08, 2009/04/20
* Release 07, 2009/03/08
* Release 06, 2009/01/30
* Release 05, 2007/05/10
* Release 04, 2006/12/14
* Release 03, 2006/09/17
* Release 02, 2006/08/11
* Release 01, 2003/03/18

.. _`go here`:

.. :mode=rest: