gbadev
Game Boy Advance homebrew development forum
Member
Joined:
Posts: 3

Hello all

Many years ago I made an experimental port of my game to GBA using the HAM compiler (but not any HAM functions). Now I want to continue developing this port. I have installed the latest DevKitARM.

I am using these commands to build it, which is similar to how I used to build it with HAM:

c:\e\gba\dkp\devkitarm\bin\arm-none-eabi-gcc -o ww.elf gba.c engine1.c engine2.c -lm
c:\e\gba\dkp\devkitarm\bin\arm-none-eabi-objcopy -O binary ww.elf ww.gba

Previously it had a main() function for an entry point but the new compiler didn't like this, so I have this entry point instead:

int _start(int argc, char *argv[])

This builds without errors but the generated ww.gba doesn't work at all (gives just a white screen); it seems to be malformed according to tools like GBA Tool Advance. Anyone have any ideas about this issue?

Member
Joined:
Posts: 3

I gave up on that and reinstalled HAM.
However when I try to compile, I get this:

7077399 [main] arm-thumb-elf-gcc 4036 fork_copy: linked dll data/bss pass 0 failed, 0x65F000..0x65F040, done 0, windows pid 268, Win32 error 487
7077399 [main] arm-thumb-elf-gcc 4036 fork_copy: linked dll data/bss pass 0 failed, 0x65F000..0x65F040, done 0, windows pid 268, Win32 error 487
7077399 [main] arm-thumb-elf-gcc 4036 fork_copy: linked dll data/bss pass 0 failed, 0x65F000..0x65F040, done 0, windows pid 268, Win32 error 487
arm-thumb-elf-gcc: fork: Resource temporarily unavailable

and no .ELF file is produced.

Administrator
avatar
Joined:
Posts: 49

Hey! I'd recommend to persevere with devkitARM as it's widely used and has up-to-date compilers with the latest fixes / optimisations / features.

After running arm-none-eabi-objcopy you need to run gbafix (which you should have under dkp/tools/bin/) on the .gba file. This will insert the Nintendo logo into the game's header and calculate the header checksum, allowing it to pass the logo check that a real GBA (and many emulators) will perform on boot.

Member
Joined:
Posts: 3

Yeah, I've figured it out now, I needed -specs=gba.specs and gbafix...Thanks for your help.