#31316 - timeblade0 - Thu Dec 09, 2004 11:38 pm
I am just starting develuping for GBA. I have windows xp and I am planning on using DevKit Advance to work on it. Can someone tell me a step by step guide on how to run and use it? I have downloaded it and unzipped it, but I don't know how to run it.
#31318 - keldon - Thu Dec 09, 2004 11:40 pm
http://www.webbesen.dk/gba/
this should be your starting point
#31319 - Lupin - Thu Dec 09, 2004 11:46 pm
#31321 - Abscissa - Fri Dec 10, 2004 12:06 am
Lupin wrote: |
http://www.devkit.tk/ - the compiler that you should use... |
I wanted to emphasize this part. You should use DevKitARM at that website (http://www.devkit.tk) instead of DevKitAdvance. DevKitAdvance hasn't been updated in ages and is just kind of dead. DevKitARM replaced it.
#31324 - identitycrisisuk - Fri Dec 10, 2004 12:36 am
Umm, maybe I'm a bit of a spaz but I downloaded DevKitArm a while ago and haven't used it because I can't find any examples of how to compile things with it. I tried using the exes in a .bat file the same way I've been using DevKitAdvance and it didn't give any errors but just gave me a ROM that didn't do anything. It would be nice if there was something on the site but it just goes as far as getting the stuff on your hard drive which seems to be the easy part. Plus I only have Win 98 and it doesn't say anything about what to do if you don't have XP/2000.
EDIT: Really sorry, I've been totally lazy in searching for stuff on this and have managed to find pretty much everything I needed just now, just had never been bothering to look properly. Still think it's a bit awkward that there's nothing on the DevKitARM site apart from the example makefiles which fly right over my head.....
_________________
Code: |
CanIKickIt(YES_YOU_CAN); |
#31327 - timeblade0 - Fri Dec 10, 2004 2:52 am
Thanks. I am using http://www.webbesen.dk/gba/ to learn from and it is very good. I have the pong game almost done. Thanks for the help.
#31335 - ScottLininger - Fri Dec 10, 2004 5:21 am
Maybe I'm a spaz, too....
I downloaded and installed DevKitArm and I couldn't get anything to compile. Of course, I only spent about fifteen minutes goofing with it, but that was enough to get frustrated and go back to my "dead" install of DevKitAdv.
If it's not broke, don't fix it. When I first started I followed the Pern tutorial and had compiled my first DevKitAdv program in a matter of minutes.
Has anyone put together a decent tutorial of taking DevkitArm from install to successful GBA compile? If so, I'd like to read it, and I'm sure a bunch of other compiler-newbs like me would like to too. I probably just missed some simple but critical piece...
-Scott
#31336 - blueskies - Fri Dec 10, 2004 5:56 am
what about the whole "Setting Up" section of devkit.tk? (Direct link, out of frames). Following that, I had DevKitARM set up within minutes. It's not that difficult.
_________________
-Jonathan
http://juansuave.com
#31346 - tepples - Fri Dec 10, 2004 7:39 am
identitycrisisuk wrote: |
I downloaded DevKitArm a while ago and haven't used it because I can't find any examples of how to compile things with it. I tried using the exes in a .bat file the same way I've been using DevKitAdvance and it didn't give any errors but just gave me a ROM that didn't do anything. |
I have found three important differences between DevKit Advance and devkitARM: - DevKit Advance has an old version of GCC; switching to devkitARM brought a speedup in some of my code.
- Where you used arm-agb-elf-* in DevKit Advance, use arm-elf-* in devkitARM.
- In the devkitARM linker command line, you need to add -specs=gba.specs in order to bring in the crt0 and linker script for the GBA. (Use -specs=gba_mb.specs for multiboot.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#31357 - identitycrisisuk - Fri Dec 10, 2004 11:37 am
blueskies wrote: |
what about the whole "Setting Up" section of devkit.tk? (Direct link, out of frames). Following that, I had DevKitARM set up within minutes. It's not that difficult. |
Set up yes, but there's no information on how you use it to compile things, it just takes you as far as choosing something to edit your text in. It doesn't describe the necessary changes to your makefiles as tepples has so nicely laid out above. I think my main problem was working with examples that did not separate out the compiling and linking so I kinda had my DevKitARM bat file almost right but not quite.
I still can't get any makefiles to work through VC++ and even if I try and type make in a DOS box it doesn't recognise it, I think my system must be a bit screwed somewhere....
_________________
Code: |
CanIKickIt(YES_YOU_CAN); |
#31401 - pyros - Fri Dec 10, 2004 8:20 pm
I also started with DevKitAdvance, then tried DevKitARM, and then got so frustrated trying, that i went back to DevKitAdvance.
However, when i tried again, and eventually, with some googling and mixing different make.bat files, mangaged to get DevKitARM to work, the difference was amazing. It compiles much faster code, even though my code was pretty optimised before compilation. It (strangely) takes much less time to compile (about 3-4 seconds rather than 10-15).
I am using the following make.bat:
Code: |
PATH=C:\Documents and Settings\jim\Desktop\GBA\compilers\devkitarm\devkitARM_r8\bin;%PATH%
arm-elf-gcc -mthumb-interwork -O2 -g0 -specs=gba.specs -o space.elf space.c
arm-elf-objcopy -O binary space.elf space.gba
del *.elf
pause
|
you may wish to remove the -O2 optimisation. Strangely when using -O3, my code hangs before starting. does anyone know why?
#31419 - identitycrisisuk - Fri Dec 10, 2004 10:01 pm
pyros wrote: |
I am using the following make.bat:
Code: |
PATH=C:\Documents and Settings\jim\Desktop\GBA\compilers\devkitarm\devkitARM_r8\bin;%PATH%
arm-elf-gcc -mthumb-interwork -O2 -g0 -specs=gba.specs -o space.elf space.c
arm-elf-objcopy -O binary space.elf space.gba
del *.elf
pause
|
you may wish to remove the -O2 optimisation. Strangely when using -O3, my code hangs before starting. does anyone know why? |
Yup that's pretty similar to mine, though I've got arm-elf-g++ for c++ and it's split over two lines. I think that makes it easier when you start to use more than one file as you need to compile then link.
Code: |
path=C:\devkitarm_r8\bin
arm-elf-g++ -mthumb-interwork -c test.cpp
arm-elf-g++ -specs=gba_mb.specs -mthumb-interwork -O2 test.o -o first.elf
arm-elf-objcopy -O binary first.elf first.gba |
I didn't have the -O2 until you mentioned it, hope that's in the right place, it seems to make a difference though its hard to tell with my emulator so slow generally. What does pause do BTW?
_________________
Code: |
CanIKickIt(YES_YOU_CAN); |
#31452 - pyros - Sat Dec 11, 2004 12:39 am
'pause' just pauses the batch file (waits for keypress); so that i can read any error messages before the window automatically closes :)
-O3 will make more difference if it works for you.
#31465 - identitycrisisuk - Sat Dec 11, 2004 1:46 am
pyros wrote: |
'pause' just pauses the batch file (waits for keypress); so that i can read any error messages before the window automatically closes :) |
Ah, that's useful as I didn't want to set the bat file up so that it closes when done as I wouldn't see errors.
pyros wrote: |
-O3 will make more difference if it works for you. |
Does seem to work with me yeah. It may be due to just having the one line in your bat file that messes it up. When I tried putting the -O2 in the first line where the.o file is made, it compiled but when I ran it there was nothing at all apart from the lower half sprite of my character O.o
_________________
Code: |
CanIKickIt(YES_YOU_CAN); |
#31476 - tepples - Sat Dec 11, 2004 4:45 am
Q: My program works when compiled without optimizations (-O0), but when compiled with optimizations (-O, -O2, -O3), it won't do anything. How do I fix this?
Answer in the FAQ.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#31493 - pyros - Sat Dec 11, 2004 10:57 am
ah, thankyou. embaressed to have not noticed.
#31502 - spekkio - Sat Dec 11, 2004 1:19 pm
OT: I noticed over the Tools Section under Assemblers/Compilers/DKs, it doesn't have a link to DevKitARM... only for DevKitAdv. Maybe Mr. Simon could update the page? just a suggestion ^^
_________________
Ipso Facto Meenie Moe... MAGICO!
#31506 - Cepheus - Sat Dec 11, 2004 2:43 pm
I did had problem in converting my devkitadv projects into devkitarm, so I decided that I should learn to compile from the start. I used the TONC tutorial at http://user.chem.tue.nl/jakvijn/tonc/setup.htm which helped me alot and was easy to follow. TONC also helped me using makefiles which is much better than bat-files.