#177795 - atari2600land - Tue Mar 12, 2013 9:42 am
So since I'm somewhat familiar with C, I thought I'd try to make my own GBA game. I downloaded a whole bunch of stuff. I got as far as making a sprite readable in GBA format. Unfortunately, if I try to compile a GBA game, I get some stupid garbage:
"gcc: error: CreateProcess: No such file or directory."
I tried searching in gbadev.org's site's search function about this, but nothing came up. What am I doing wrong?
edit: I'm using Windows7.
edit: mods, please move to the newbie section.
#177796 - Dwedit - Tue Mar 12, 2013 4:22 pm
Sounds like it can't find GCC. Make you have these directories in your PATH environment variable (put them at the end so they aren't higher priority than Windows itself):
C:\devkitPro\devkitARM\bin
C:\devkitPro\msys\bin
You might need to reboot as well.
Then try building the example programs that came with devkitarm. They should build then.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
#177797 - atari2600land - Tue Mar 12, 2013 5:57 pm
It can't find GCC at all? What should my batch file read then? Right now it says this:
path=C:\DevKitPro\
gcc -o gosubgba.elf gosubgba.c
objcopy -O binary gosubgba.elf gosubgba.gba
pause
I put a copy of GCC in the DevKitPro folder and yet it still can't find it. I'm guessing GCC is how you make an .elf file. This is my first day programming GBA.
#177798 - Dwedit - Tue Mar 12, 2013 6:25 pm
You want to run "arm-eabi-gcc", not plain "gcc". Try the example projects, they use a makefile to generate everything, which automatically includes the source code, and correctly runs the compiler and linker, then outputs a .gba file.
You would also need to use the correct linkscript, so it would put the sections into the correct memory areas, and the magic makefiles take care of all that.
_________________
"We are merely sprites that dance at the beck and call of our button pressing overlord."
Last edited by Dwedit on Tue Mar 12, 2013 6:28 pm; edited 1 time in total
#177799 - atari2600land - Tue Mar 12, 2013 6:27 pm
I got something to compile, but it just displays all white in VisualBoyAdvance.
I don't know how familiar you are with the sprite example. That's nothing but whiteness.