First begin by logging onto the CPSC server over SSH.
To compile your programs for the GBA, use the
$ gbacc hello.c
This produces a file called
program.gba. Like the regular gcc
command, you can also supply the
-o flag to change the name of
the output file.
The gbacc program is a script that invokes the cross-compiler and does other things needed to make a Game Boy Advance ROM.
The .gba files produced by the compiler contain code for the GBA and cannot be run directly on the CPSC server. They need to be run on a GBA emulator. VisualBoy Advance is a free GBA emulator which works well and is available for several platforms. Download and install it on your local system.
Then you can transfer the GBA file to your own computer in order to run it in the emulator. There are two ways to do this:
Copyright © 2024 Ian Finlayson | Licensed under a Attribution-NonCommercial 4.0 International License.