Getting started with GBA development on Linux

For this year’s Global Game Jam, I finally set aside the time to get into GBA programming, and I am in for an adventure. Most tutorials lead to dead ends and aren’t targeted for Linux. To save you the time of wading through all of the outdated material, here is a summary of how I got DevKitPro working on Linux.

I’m not going to reiterate all the details and alternatives, but you can find all the information you could possibly dream of in the links I’ve included at the end of this post.

  1. Install VisualBoyAdvance — Emulator to run your .gba files: https://apps.ubuntu.com/cat/applications/quantal/visualboyadvance-gtk/

2. Install DevKitPro — The only active GBA devkit. Use the perl script linked below. Save the file as devkitARMupdate.pl and make sure it can be executed (eg. chmod +x devkitARMupdate.pl).

https://gist.github.com/Ahris/61cee92e6728312a1fdb

At the end of the installation process, it will tell you to set some environment variables to lead to the compiler. Replace the paths in the following example with the place where DevKitPro was installed.

> echo “export DEVKITPRO=<PATH/TO/DEVKITPRO>
export DEVKITARM=<PATH/TO/DEVKITPRO>/devkitARM” >> ~/.profile
> source ~/.profile

Source: https://3dbrew.org/wiki/Setting_up_Development_Environment

3. Compiling your first program — There is a working template in the DevKitPro folder. Make a copy of it, compile it, and run it to see a beautiful “Hello World” message.

> cp $(DEVKITPRO)/examples/gba/template </PATH/TO/YOUR/PROJECT> -r 
> cd </PATH/TO/YOUR/PROJECT>
> make
> VisualBoyAdvance <YOUR_PROJECT_NAME>.gba

Good luck!

Links and general information

Development tips: http://www.coranac.com/tonc/text/setup.htm

Where I finally found useful information: http://www.dwheeler.com/gba/

DevKitPro documentation: http://devkitpro.org/viewtopic.php?f=13&t=8542&sid=8c9c3b57b08fe6d83c3b6ea3f7b9ce27

Comprehensive list of Linux GBA links: http://linux.gbadev.org/

Your new home page: http://www.gbadev.org/

Windows setup information

http://gbajunkie.co.uk/

http://devkitpro.org/wiki/Getting_Started/devkitARM