Tuesday, 9 January 2007

Stackless Python 2.5 for the Nintendo DS

I have recently been corresponding about NDS Python with several people on a range of topics and a common problem each had was that they were unable to work out how it should be compiled. Since there were some gray sunless summer days, I decided to flesh out and correct the instructions I originally wrote. A day later and the end result is that this lead to me updating the existing port to the latest version of Stackless Python.

Porting Python to another platform given the presence of C runtime libraries is actually pretty straightforward. Most of the work I did in the original port of Python 2.4.3 was on two different aspects, getting the Stackless hard switching to compile properly with arm-elf-gcc and hooking up the hobbyist file system support for homebrew devices to the C runtime so that Python could access it. And similarly with the Stackless switching already working, the work in porting Python 2.5 was updating the code which hooked the file system support to the C runtime for the changes in the development environment devkitPro.

As a standalone Nintendo DS application it is still as useless as the last port due to lack of support for the DS hardware. I go into that in detail on the web page I link to for it above. But given an application which provides Python bindings for custom access to that hardware it might however be usable as an embedded scripting language.