Can someone help me get DevkitPRO/ARM to compile a GBA sample?

Started by SleepyFist, April 24, 2019, 01:08:51 PM

Previous topic - Next topic


I'm trying to run the GBA programming tut over at patater.

  • Installed DevkitPro
  • Updated DevkitPro(Initial install missed some files)
  • dropped patater's sample code into an test_1.S file
.global main
mov r0, #0x4000000
mov r1, #0x400
add r1, r1, #3
str r1, [r0]
mov r0, #0x6000000
mov r1, #0xFF
mov r2, #0x9600
strh r1, [r0], #2
subs r2, r2, #1
bne loop1
b infin

  • Command Prompt, Desktop, make test_1.S
  • It tells me no action is required, but doesn't produce anything apparently?

I know 'm doing something wrong but I don't know what, don't really have much experience compiling outside of Visual Studio.


This is what make prints when everything has already been built?

What's your makefile look like? I'm not a make guru, but I know the basics. I can take a look for you.


So uhhh, I don't have a makefile? and I also don't know how to generate one.
Aside from the code above the instructions read

QuoteMake sure your current directory is where your test_1.S file is and type the following:

arm-elf-gcc -mthumb-interwork -specs=gba.specs f.S and hit enter.
arm-elf-objcopy -O binary a.out a.gba and hit enter (not gonna say that again).

If no errors are generated, a "a.gba" file will be, run it. It should make a fairly red(ish) screen. Don't worry about understanding the code right now, this is just to make sure you can compile some code.

The problem is that those particular instructions don't actually do anything, it just reads it as a bad command, possibly because it was written for an older version of DevkitARM, I saw a post somewhere that said I should just use the make command.


These commands are for a cross compiler. You need to get you development environment set up first.

If you are on Windows you first need to get a Linux machine setup. Best to get virtalbox and install Ubuntu

Once Ubuntu is set up do the following

sudo apt update
sudo apt install build-essential
sudo apt install make
sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install arm-gcc-none-eabi

Once those are installed you can build for ARM. But you will need to study the reference manual to do anything of interest.


Thanks,I'll go do that then, a little annoyed that I couldn't get the current installation working but I'll go with whatever works.