Bare metal Raspberry Pi Squeak

This is a project I worked on about 11 months ago -- it's very incomplete, and barely usable. I was compelled to put up the code for others to look at after Steven Troughton-Smith mentioned there were no examples of the mouse driver code from Chadderz's Simple USB Driver. That mouse driver was written for this project, so it seemed appropriate to finally post the code.

This is a modified version of the Squeak Smalltalk virtual machine to be booted from the bare metal. The kernel.img is the VM, and it will initialize the serial port (for lots of debugging), initialize the frame buffer, use CSUD to attempt to interface with the keyboard & mouse (very flakey). It (ab)uses ATAGs to have the Raspberry Pi firmware load the Squeak image for it to run. If all goes well, it should boot into a fully usable Squeak system in a few seconds. And when all goes bad, there's at least a watchdog timer to help reboot the system

For those that just want to play with it and not deal with compiling, there is:

One should be able to unzip that onto an SD card and have the RPI boot into Squeak.

The project owes a lot to various forum members here -- it's been too long so I can't remember everybody whose posts were instrumental in getting this up and running. But I do remember it was Alex Chadwick's Baking Pi that led me to trying this out in the first place. Many thanks to Alex for his excellent tutorial.

Thanks for posting this; your help today was instrumental in getting USB mouse support working in my project.

I'll add that if you're looking at the code for mouse-related purposes, I've found csud to be really picky as to what it accepts as a mouse as-is and whether it will provide usable values. None of my wireless mice worked, my Apple Mighty Mouse did show up but the XY values were unusable; I had the best results from a 2001-era Apple Pro Mouse, which worked flawlessly. YMMV.

That's pretty cool Steve. I haven't done a raw-metal Squeak in a few years now; the last one was for Interval Research in 96-2000, where we had a medium-hard realtime OS written in Squeak and running on a custom pad based on a StrongARM and some very special ASICs. Think slightly clunky iPad with alarmingly large battery packs (no easy LiPos in those days) and a mere 1024x768 screen. All Smalltalk, all the way down!