H2D2 running on Linux

Well, I tried running my H2D2 programming language / virtual machine thingy on the Fez Panda II by means of RLP, but I wasn't successful. Alas, the amount of memory left for running native code is not big enough for it. If I was really brave I could use the board as a native ARM development board I think, but I'd rather do other stuff...

Speaking of which, I've gotten round to hacking up a makefile for H2D2 so I can compile it on Linux with GCC. It was easy really, I've just created the simplest makefile you can imagine. But here is my usual victory dance running on Debian Squeeze emulated in VirtualBox:

Which is awesome, and 440 milliseconds is rather quick - especially because it's running in an emulator. I also tried it on the machine I built from an Intel D410PT motherboard and it managed to do it in 400ms flat. These rather unscientific benchmarks seem to indicate that GCC on Linux is more efficient than Pelles C generating code for Windows.

So I guess the only logical step now is to compile it on the Raspberry Pi. It would be rude not to.

Another computer

Ages ago, I decided to build a new computer from an Intel D410PT motherboard that I bought. I was (and still am) going to install it as a PDP-11 emulator. Anyway, I built the machine but never got round to installing an OS on it. Actually, I did try to see if it would run Windows 7 ... but Windows was not happy with being installed on a USB flash drive as a boot disk.

But, since recently I've gotten used to Debian, I thought that I'd try that. This is an OS that is very happy to boot from a USB flash drive. This is cool, since I can swap hard disks for the machine without even mucking about with screwdrivers. Here is the machine running Debian 6 off a small 4GB flash drive I bought in Tesco:

So... here are the things that I actually bought to build it:

  • Intel D410PT motherboard (with integrated Atom processor)
  • 1GB Kingston Technology 667MHz DDR2 memory
  • LinITX mini-ITX case inc wall mount and power supply CFI-ACD29CC

...all that stuff cost me £103.00 including the shipping costs. I only had to add the USB flash drive for storage (but I already had that lying around). It's not as pretty as a mac mini, but it's still quite a small little machine. All the software I've used is free, so I have Debian 6 (squeeze) coupled with Google Chrome and it quite happily streams TV channels through BBC iPlayer and other services like TV Catchup. So at the moment it's working as a nice cheap little media centre. The next step is to install SIMH and start emulating some old hardware...

Unexpected Pi

A very kind colleague of mine has lent me his Raspberry Pi, so that I can have a little play with it. Here it is being hooked up on my workbench:

I used the standard Debian 'squeeze' image, since that's what I've been messing about with recently. After checking that I had internet access, I went off and installed the mono runtime, like this:

sudo apt-get update
sudo apt-get install mono-runtime

...after doing that I ran the C# webserver example that I had already written - and it works a treat! I didn't compile the code on the Raspberry Pi, I simply copied the exe file over and ran it with the mono command. The code was compiled in monodevelop running on Debian in VirtualBox.

Anyway, here is another photo, taken when I was first cheking that I could get online. Umm, I need to tidy up in here again.

More reports will follow I'm sure...

Raspberry Pi Preparations

I am currently in the queue to receive a Raspberry Pi. Apparently my machine is about 5 weeks away. So I have decided that I should begin making some preparations. I have downloaded an ISO image of Debian "squeeze" (the version with the LXDE desktop). So at least I should know my way round the OS in advance.

After installing the Debian ISO on a virtual machine, the first thing that I did was install the monodevelop IDE which I don't think will actually work on the Raspberry Pi ... but should enable me to try some things out and then just compile them from the command line on the Pi (hopefully).

Monodevelop seemed to work like a charm on Debian, so I grabbed my C# webserver example to try out some code.

Amazingly, the only real thing that I had to change was add the following delegate declaration:

public delegate TResult Func<in T1, out TResult>(T1 arg1);

...apart from that the code worked without any changes. Here is a screenshot of it all working:

So I am hopeful that I will be able to run my little slimline webserver on my Raspberry Pi when it arrives.