RTEMS Python.

 Chris Johns <cjohns@cybertec.com.au>
 5 Sep 2003

This is a tarball snapshot of the current Python code I have working for
RTEMS. The code base consists of some patches the the Python code base, all but
one are in Python, and some additions. The outstanding patch is on SF but noone
has looked at it and I have not followed it up. The extra file is an RTEMS
module import support which is actually just a static linked but initialised
when the import happens. The other files are in a directory:

  rtems/python-cvs/dist/src/RTEMS

This is the configure and makefiles to build.

I have tested Python on a Coldfire (5272) with RTEMS 4.6 pre3. My testing has
been limited. I have not run any of the Python test code or used threads (I
that I know of).

The configure script is based on the Cybertec setup we use and made generic for
RTEMS. It should create a 5200 library. The script will need to be changed for
the specific target you use. The setup has only been tested with a multilib
setup for RTEMS. You will need to bootstrap again after changing the
configure.ac script:

  $ cd rtems/python-cvs/dist/src/RTEMS
  $ ./config/bootstrap

It would be better if the configure could take a CPU type from the command
line, but I am not sure how to do this.

To build, I have provided what I have used at the top level directory:

  $ cd rtems
  $ ../python-cvs/dist/src/RTEMS/configure --target=m68k-rtems \
              --enable-rtems=/opt/rtems
  $ make

A sample application is provided in:
  
  $ cd rtems-python
  $ make

This assume you have the Cybertec SFP-101 My Right Boot and board support
package installed. The example program expects 'main' and you should end up
with a standard Python prompt on the RTEMS console.

The example app links in a tar file of the Python source you need. If you wish
to use other Python code, copy into the lib directory:

  rtems-python/python/lib/python2.3/

and remake the example application. Some Python code may require Python modules
to built and linked into Python. Most of these are in:

  python-cvs/dist/src/Modules

The Makefile.am to build the code is in:

  python-cvs/dist/src/RTEMS/Makefile.am

Please report problems, success, or whetever to the RTEMS maillist.

