Home CPSC 305

Compiling Game Boy Advance Programs

Overview

The Game Boy Advance is a very different piece of hardware from the computers you typically use. It has a different processor architecture, and does not have an operating system. Because of this, programs compiled for other machines cannot run on it. gcc and other compilers you have used are not able to produce code that runs on the GBA by default.

Because of this, we need to use a cross-compiler which is a compiler which generates code for a machine different from the one it is running on. This is a different version of gcc which has been configured to produce GBA code. The instructions below show how to set this up.

Unfortunately, the cross-compiler only works on Linux machines. We could use the cs server for this, but the GBA emulator can not be run on the server. There are three different ways you could get around this problem, depending on your preference:


Options for Compiling and Running

Copyright © 2018 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.