#17736 - slile - Sat Mar 13, 2004 6:13 pm
I was looking through the faq, and I've been looking through the various dev kits, but almost everything appears to be for the x86 architecture.
Does anyone know if there are any dev kits that work on the Macintosh (OSX) and PowerPC architecture? Would the x86 compile fine if I just grabbed the source, since it compiles into a third architecture anyway?
Thanks!
#17749 - poslundc - Sat Mar 13, 2004 10:12 pm
The two main pre-compiled options for us Mac users seem to be the following:
GBASDK
Velvetfr
The first one offers a complete package with Devkit Advance that is ready to compile out of the box, but has the disadvantages that it uses an older version of gcc (3.0.4) and also packages with the Socrates libraries (which most people don't want and it's a bit of work to disconnect them from your project).
The second one is just a straight gcc compiler for ARM/Thumb, so you need to acquire Devkit Advance's crt0.S and lnkscript from another source (not terribly hard to find). But you're getting gcc 3.3.2 with it, which is nice. Might be a bit more work to get everything up and running.
If you're serious about GBA programming, though, my advice to you is to get your hands on a cheap Windows box or laptop to work alongside the Mac. You can still do all of your editing, compiling, etc. on the Mac if you want (I do), but when it comes to debugging you will want the Windows tools. VisualBoy Advance for Windows has a ton of useful features that are absent on the Mac version.
I keep my Mac and a Windows laptop networked, with Windows filesharing and SSH running on the Mac. When I need to debug something I switch over to the laptop, and make any changes to the sources I have to using the filesharing and then recompile them remotely with SSH. It's a great system for me.
Dan.
#21422 - Jedd - Fri May 28, 2004 11:33 pm
I'm also running on Mac OSX and I've been really interested in GBA programming. But I'm having some trouble setting up GBASDK. I have Xcode installed and I downloaded the .dmg for GBASDK, but I still can't figure out how to work it. Is it supposed to run in the Xcode environment, or do I compile from Terminal prompt? Can someone please walk me through the steps involved in setting it up, so send me to a link that explains it? Thanks. :D
-J
#21430 - poslundc - Sat May 29, 2004 2:09 am
I'm still running 10.2, so I don't have XCode. But the project files that come with any of those will be for Project Builder, so unless they can be imported into XCode you'll have to configure the IDE on your own.
Personally, I just compile from the terminal and use BBEdit as my source editor. You need to get the hang of makefiles, though, or you will go crazy trying to figure it all out.
Dan.
#21436 - Jedd - Sat May 29, 2004 3:38 am
Ok so I'll make my code from TextEdit. What is the command line to get it to compile from Terminal, and in what directories do I need to put the files (and what files?)? Sorry for the mountain of questions, hopefully I can get this figured out within a few days. Thanks again for your help.
-J
#21452 - poslundc - Sat May 29, 2004 3:34 pm
Well, the command-line program is gcc, but if you have the Developer Kit installed then if you just call gcc on the command line you'll get the wrong version of gcc (the one targetted for Mac programs instead of GBA). So you need to call it from whatever directory it was installed into. This is part of the reason having a makefile is very useful.
If your distribution came with a makefile, just go into the makefile, change whatever parameters are applicable to your program, and call "make" in the same directory as your makefile.
Dan.
#21456 - ecurtz - Sat May 29, 2004 3:52 pm
You can compile from XCode or ProjectBuilder by using custom build. You still need to write the makefile, although if you wanted to spend the time I'm sure you could figure out how to make XCode do it for you.
#21460 - tepples - Sat May 29, 2004 4:10 pm
poslundc wrote: |
Well, the command-line program is gcc, but if you have the Developer Kit installed then if you just call gcc on the command line you'll get the wrong version of gcc (the one targetted for Mac programs instead of GBA). So you need to call it from whatever directory it was installed into. |
Unless you do like I do on devkitARM for Windows: put the native compiler in front of the cross-compiler in the PATH (yes, there's still a PATH on Darwin), and then use 'arm-elf-gcc' to compile and link programs. It's explained in my draft tutorial.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#21507 - Jedd - Sun May 30, 2004 6:27 am
Ok I think I got it set up correctly. Could someone please link me to a source file so I can try to compile? That way I can test to make sure I set it up correctly. Also, what do I need to type to invoke the Makefile? I assume ./Makefile, but that could be wrong. Thanks.
-J
#21662 - slile - Wed Jun 02, 2004 7:26 pm
Jedd wrote: |
Also, what do I need to type to invoke the Makefile? I assume ./Makefile, but that could be wrong. Thanks.
-J |
Type "make" in the directory the Makefile is in.
#21703 - Jedd - Thu Jun 03, 2004 7:29 am
:D :D :D YAY. It worked perfectly. So when I type "make", the makefile takes the source from the Source directory and spits it out in the SGADE directory? That's what it looks like from what I can see.
-J
#21709 - poslundc - Thu Jun 03, 2004 12:07 pm
It depends on what is in your makefile.
Dan.
#21713 - Jedd - Thu Jun 03, 2004 3:28 pm
Ok well I'm just going to assume that's how it works. Now that I've got Hello World running, it's time to move on to the tutorial. Thanks for all your help getting it set up!
-J