CPSC359 VM

The CPSC359 VM contains the tools required to connect to the FT2232 device connected to the Raspberry Pi in order to load and debug baremetal code. All of the tools in this VM should be available on all computers in MS-252.

You can use it as a means to quickly get a development environment for your Pi kit if you are not sure how to install the toolchain yourself (which is fair - don’t build toolchains!) or work in MS-252.

Specs

The VM is configured with the following specs:

The specs can be adjusted in the VM settings if desired.

The VM runs Fedora 42 and includes a mostly-default Cinnamon desktop, Visual Studio Code, openocd, screen, gdb, and the toolchain required to build code for the Pi - aarch64-elf-gcc.

A basic bare metal code example is included in ~/Examples/rpi4-baremetal-uart, sourced from ethanfaust/rpi4-baremetal-uart.

System Requirements

You will require the latest version of VirtualBox available for your OS. The VM has been tested in VirtualBox 7.1.12 running on Linux and Windows. macOS is currently not supported and your mileage may vary if you intend to run the VM on a macOS host.

You will need a minimum of 20GB free disk space and at least 8GB RAM. You should also ensure that virtualisation acceleration enabled in your BIOS. Check your motherboard’s documentation for more information on this.

Downloading the VM

The VM image is approx. 4GB in size and can be downloaded here.

CPSC359.ova 4.3GB, sha256:
245e0113a1238875ba2f7f3a96261f4f98926e2f5ba1f95a245bd9fb2886412b

Installing the VM

The following steps assume you already have VirtualBox installed on your system.

VirtualBox has an import feature accessed from its main menu. Select Import and then browse to where you have saved the CPSC359.ova file.

Screenshot showing the Import Appliance dialogue in VirtualBox

Once you have selected the .ova file, you will be presented with a screen that will allow you to customise the VM configuration. By default, we have allocated 2GB of memory and 2 CPU cores. If your hardware is up to it, feel free to increase these before continuing.

Once you are happy with your settings, click Import. Do note that it will take some time to import the image.

Accessing the FT2232 (Debug/UART/Serial interface)

Plug the FT2232 device into your computer via USB. With the VM running, navigate to Devices -> Usb and select the FT2232 device. The name may differ from what is shown here, but it will probably be something like FTDI <-> Serial

With it selected, the device will be passed through to the VM and you will be able to interface with it as though it were “plugged in” to the VM itself.

See the Development Guide for information on working with sending code to the Pi.

Known issues