Welcome to AVR32 Linux... Users Groups

Python for AVR32 (AP7000)

Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java.

It happens to replace completely the other programming language and interpreter which share the same first letter.

Python Binaries

* python-2.5-avr32-bin.tar.bz2: Python 2.5 binaries for AVR32

Building Python

Cross-compiling python is tricky because it is a two-pass process involving building a (host)utility and a cross-compile builds the (target)utilities and tries to run them (the target-built utilities) on the host-system.

The below recipie is taken from http://www.ailis.de/~k/docs/crosscompiling/#python, and an updated configure script is from http://whatschrisdoing.com/blog/2006/10/06/howto-cross-compile-python-25/. I will supply proper Makefile targets and perhaps a proper autoconf-based system down the path smile

# patch -p0 < Python2.5_xcompile.patch
# configure
# make python Parser/pgen
# mv python hostpython
# mv Parser/pgen Parser/hostpgen
# make distclean

Prepare for cross-compilation (update the host option for your os):

#CXX=avr32-linux-g++ \
 CC=avr32-linux-gcc \
 AR=avr32-linux-ar \
 RANLIB=avr32-linux-ranlib \
 ./configure --host=i586-pc-linux-gnu --target=avr32-linux --prefix=$HOME/install

# make CXX=avr32-linux-g++ \
       CC=avr32-linux-gcc \
       AR=avr32-linux-ar \
       RANLIB=avr32-linux-ranlib \
       HOSTPYTHON=./hostpython \
       HOSTPGEN=./Parser/hostpgen \
       BLDSHARED="avr32-linux-gcc -shared"

# make install prefix=$HOME/install/usr \
       HOSTPYTHON=./hostpython \
       BLDSHARED="avr32-linux-gcc -shared" \

Using Christopher Lambacher's cross compile patch against Python 2.5 and passing the toolchain options to configure should allow Python to compile cleanly. I believe that the 'struct stat' and 'stropts.h' issues reported earlier were caused because the configure utility was run against the host libraries, which could have an incompatible timer header.

Tested versions

  • Python-2.5


Type: # python

And start the fun life of developing python applications.


  File Size Date By Actions
else python-2.5-avr32-bin.tar.bz2
Python 2.5 binaries for AVR32
13130.9 K 2007-12-28 - 01:40 JohnVoltz props, move
r7 - 2009-09-08 - 08:36:32 - MarkusEkler
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Syndicate this site RSSATOM