Greg Elliott is currently responsible for this page. Questions regarding it can be directed to
gelliott THE AT SIGN gmail THEN A DOT com.
Here’s the general idea of how this is going to go: Buy your gumstix, buy cables and interfaces to connect to it, build a new filesystem (called a buildroot) that has all the stuff you’re going to need (audio libraries, python, sql, bluetooth, etc.), put this new buildroot onto the gumstix (over serial or using mmc memory cards), boot it up and check it out.
first, you need a compiler. why? so you write your code in C, or assembly, or python or whatever. then you have to compile that code, but you can’t just use the compiler you happen to have lying around. oh no, you need a compiler that can make code just for the pic chip you want to use. so, pick the language you wanna write in and download the appropriate complier.
There’s a nice pic simulator (optional) that allows you to test your code in a simulated environment. Lin/Win only. =(
So now you have your code, it’s compiled and ready to go. How do you get it onto the PIC? Enter: PicP. It sends your nicely compiled code to the PIC and flashes it onto the chip.
So, follow the instructions above to get to the buildroot menu, arrow down to Python, check it, exit and save then ‘make’ the buildroot.
here’s my trick: the python files by default use the /usr/bin/gcc compiler. i wasn’t root on the linux system i was using, so i:
1. reset my path to include the gumstix compiler (arm-linux-gcc, see above if you don’t know what this is) and not include the /usr/bin directory. then i made a link named ‘gcc’ and pointed it to the arm-linux-gcc file. here are the terminal commands to do that (substitute your gumstix dirs and what not)
> $PATH
> (your path is shown, copy it)
> export $PATH=(paste here), then remove the :/usr/bin part
> ln -s ~/mygumstixpath/staging-dir/bin/arm-linux-gcc ~/bin/gcc
now just run python setup.py build as you normally would. python will find a gcc in your ~/bin directory, and use that. that file of course poitns to arm-linux-gcc, so you’ll be compiling the module using the gumstix cross-compiler. when it’s done, you’ll have a .so tucked away in the python module’s directory that you’re in, under lib/xxxxxxx86.lib/lib/ or somethign like that.
copy that to the gumstix, put it in /lib/python2.4.xxxxx/site-packages.
for certain modules, you might need to also copy over .so’s for the libraries your new module depends on. to check what your new python module depends on, do