Posts: 1
Joined: Sat Nov 24, 2012 5:44 pm

Bare metal Raspberry Pi Squeak

Tue Oct 08, 2013 9:45 pm

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.


Posts: 5
Joined: Sat Oct 05, 2013 1:54 pm
Contact: Website

Re: Bare metal Raspberry Pi Squeak

Wed Oct 09, 2013 3:37 am

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.
Screen Shot 2013-10-08 at 17.59.37.jpg
Mouse drawing, bare metal
Screen Shot 2013-10-08 at 17.59.37.jpg (54.35 KiB) Viewed 2273 times

Posts: 1068
Joined: Mon Oct 29, 2012 8:12 pm
Location: Vancouver Island
Contact: Website

Re: Bare metal Raspberry Pi Squeak

Fri Oct 18, 2013 4:40 am

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!
Making Smalltalk on ARM since 1986; making your Scratch better since 2012

Return to “Bare metal”

Who is online

Users browsing this forum: No registered users and 5 guests