Python-on-a-chip
code.google.com
code.google.com
It's kind of neat that they have an online c++ compiler for it.
The project linked from the thread's title says that Python runs on the chip itself unlike the RAD for Arduino that compiles down to a C program.
A fully functional Lisp machine with a USB keyboard and mouse to match would be the ultimate übergeek gift.
A small Alto would also be pretty neat. The vertical screen could be tricky.
Seriously: more than once we have lost a technology because we turned the other way at some point. The Lisa'a stationery idea is one example off the top of my mind of a great idea that was not only ahead of its time but ahead of our time. We install programs and run them to create documents instead of using a desktop to create a document of a new type that the program we installed happens to support. I like to joke Smalltalk 80 made Java 2010 look primitive. I am only half joking on that.
might make it simple enough to develop a lisp machine.
Maybe I'm just not 'with it', but last microcontroller I used had 64KB of address space. 43KB overhead seems like a lot.
The other target, STM32, is a similar Cortex-M3 microcontroller.
Want to use something different than C with a smaller footprint? you can always play with forth ^__^ for example an MSP430 (TI 16bit) port of CamelForth, should be usable with any MSP430 device having at least 512 bytes of RAM, 8K of ROM, and one USART. www.camelforth.com
It's fun and it doesn't hurt too much ;-)
Regards Pietro
Only microcontroller architecture than I know of than can be (ab)used as von neuman machine is MCS-51 (and there are even some mass produced products that do that and have self-modifing firmware). But MCS-51 is not exactly fast and moreover this hack requires considerate amount of external components.
It was a very long time ago though, so I may have some details wrong here, but the sl45i jar hack should be still available on youtube to prove it. Fast -- it could do 26MHz. Cheap... not sure.
Edit: Now I remember that someone wrote a binary file loader (from the MMC) that were either memory-copied, or memory-mapped. So yes - definitely look at the Siemens-Infineon C16X series - or newer if they exit.
The architecture of the CPU refers more to how the data is processed internally, but generally speaking, it's always "load from ROM, stick in RAM, execute in CPU, write results back to RAM." Rinse and repeat.
However, the Von Neuman views both ROM and RAM as a single, vertical unit. You can shift data to and from the ROM & RAM as needed to represent a single high-speed high-volume storage unit, but that's only needed if you want an easy way to page RAM to disk (not run programs from RAM).
The Modified Harvard Architecture is nice, and is popular with many embedded devices. I primarily use Atmel, and their Modified Harvard works great for me.
Have a look: http://en.wikipedia.org/wiki/Modified_Harvard_architecture
When you're dealing with embedded devices, there's (almost always) another way of dealing with the RAM requirements. For instance, I highly recommend the AT90USB1286 CPUs for hobbyists and entry-level enterprise stuff because of their true USB support and super-low cost. These only have 8k of RAM, but they have 128k Flash memory. You should be able to use the flash to do what you need.
The only time you need the kind of stuff you describe is when you're basically running software meant for "normal" CPUs on microcontrollers. When you're trying to run "operating systems" instead of firmware, and "packages" instead of highly-optimized and platform-specific code, that's when you need 32KB+ RAM. For everything else, a larger (32KB+ all the way till 1MB) ROM backend will do.
My only problem with the ATMEL was the limited EEPROM size for the actual firmware, and since it's a Harvard architecture the separation between data and instructions makes it difficult to run code from the flash ROM. But the new generation now has 8k+ EEPROM for the firmware, which is a nice improvement.
Have a look at mini PCs and plug PCs.
http://www.hawkboard.org/distributors http://www.linuxfordevices.com/c/a/News/Mini-Linux-PC-breaks... http://www.wired.com/gadgetlab/2009/02/marvell-offers/
Of course, you don't say what you want to teach, so these could be totally missing the mark.
Some of NXP's ARM microcontrollers have an external memory bus (but most don't have an MMU), and will run uClinux given enough RAM.
"What's the motivation to make a chip that runs Python?" "To be able to run Python on a chip."
It's easier to do complicated things in a language like python than with C++. And it will never let you dereference a null pointer.
Being able to use Python's standard library on a chip would be useful. It's a dynamic language so you can do things you couldn't do with C. It's type-safe and easy as all hell to use. The usual motivations for using Python apply here. It just uses more resources and is understandably slower to execute.
Write once/run anywhere would be a motivation. - "Run anywhere" is not true for most desktop programs and definitely not true for embedded stuff. When you're at 64k, you usually don't even reuse stuff like display handling, because your PCB layout is different enough that you'd have to rewrite the i/o layer anyways. Or because you a specific way to get the data. Or...
I can't imagine much reasonable code reuse outside of standardised platforms like Arduino. Much less any "run anywhere" programs.
It's a dynamic language so you can do things you couldn't do with C - There's nothing in language X, that you cannot do in C.
Since it seems to be a google project, I guess they're just trying to create something that can be pushed onto Android, much like their own Java VM.
"Better for x," it would seem, is the only type of argument that will be tenable. So, what's an application for a microcontroller that will actually make use of Python's various advantages over BASIC?
Classic microcontrollers (which AVR essentially is) have relatively large amounts of program memory combined with miniscule RAM, for dynamic VM you need it exactly other way around.
Hotspot hotshot Clif Click's blog is worth taking a look at: http://www.azulsystems.com/blogs/cliff/
(I wasn't clear from your statement "I know it's been tried with Java before" if you knew it is working on ARM, or if you were referring to niche chips like the JavaChip etc)
I'm just wondering as the Android footprint grows if this could be an evolutionary step. It's also been rumoured that Apple could buy out ARM Holdings.