Author: | Dean Hall |
---|---|
Id: | FrequentlyAskedQuestions.txt 317 2009-03-17 02:25:27Z dwhall |
This document lists common questions and their answers that people new to PyMite ask. In doing so, it is intended for new users and programmers.
PyMite is a flyweight Python interpreter written from scratch to execute on 8-bit and larger microcontrollers with resources as limited as 64 KB of program memory (flash) and 4 KB of RAM. PyMite supports a subset of the Python 2.5 syntax and can execute a subset of the Python 2.5 bytecodes. PyMite can also be compiled, tested and executed on a desktop computer.
PyMite is offered under one of two licenses: commercial or open source. The GNU Public License version 2.0 is the open source license. Please contact the author for terms of the commercial license.
Not yet.
Download PyMite from http://pymite.python-hosting.com/ and follow the instructions in the README to build and run PyMite on the desktop.
Read BuildSystem to learn how to build PyMite for a microcontroller target. To compile and flash PyMite to a microcontroller is highly dependent on which microcontroller you have. I cannot answer this for you. You'll have to find out how to do this for your specific target microcontroller.
There are two sample projects in the source tree. One for an 8-bit Atmel ATmega103 (but any AVR/ATmega with 4 KB RAM or more will do) and one for the 32-bit Atmel AT91SAM7S64 running on the AT91SAM7S-EK evaluation board.
PyMite is so easy to port (there are 4 functions to adapt, see examples in the src/vm/plat directory) that any microcontroller with 8 KB or more of RAM will do. I recommend 8 KB or more of RAM because 4 KB is rather tight and doesn't allow much more than simple programs.
Python 2.5 or 2.6. Python 3.0 is not yet tested, so avoid it for now. You'll need gcc to compile for the desktop, avr-gcc for AVR, arm-elf-gcc for AT91SAM7S, etc. If your OS is a version of Windows, I recommend using Cygwin so you have a Unix-like terminal to run make and gcc.