Using QEMU to Emulate Raspberry Pi to Learn Assembler

There is no simple way to run a Raspberry Pi in an emulator so that you can learn some Arm assembler too. Yes, you can launch your Pi in VirtualBox, but it won’t let you also run assembler for an Arm architecture. So what to do? You go use Qemu emulator instead. This offers new challenges. See links below for more details.

Qemu needs a kernel plus an OS image for that system too, which you combine together into a launch script to suit your host system OS. Qemu is also limited to 256 MB of memory so don’t try to run a desktop system. Be happy with a terminal, or suffer a very slow system. Given it’s a script, you can tweak it to suit your needs. You only need to find, or create, a matching kernel and OS image to meet your needs and then you’re good to get started.

I needed a MacOS one for myself, and was able to modify the script from the link below and swap in our Pi image, and have it running nicely. I did have to edit the image once it was working so that it would boot to the console, and stop there, instead of booting to the desktop. As this image was modified, I couldn’t use the rasps-config tool, so had to run this command to change the boot level: sudo systemctl set-default

For our students, however, we need a version to run on Windows. At the moment I can only refer them to the one below, which is based on 2012 images of Debian and Raspberry Pi, so is not very current. But it does run (at least on my Windows 7 office machine), so all’s ok when you’re learning assembler and working with the terminal and Vi in any case. Hopefully it works on Windows 10 too.

At another time it would be useful to go through this more carefully and update the Windows version for our students.

QEMU instead of VirtualBox, as it works with ARM

Raspberry Pi kernels to use with your Raspberry Pi image.

MacOSx – go to the bottom to find most recent updated script to run and tell you about options.

Linux Walks you through the basics, and explains some procedures to connect to your device that also work with MacOS.

Windows These are from 2012, but will get you started.


The University of Aberdeen is a charity registered in Scotland, No.SC013683