gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Beginners > Is there a DevkitARM command documetation?

#40382 - killlerofangels - Mon Apr 18, 2005 5:43 am

After two weeks of learning BSD shell navigation and a little makefile construction, I've gotten some programs to successfully compile using the TONC tuturial (which is the only one I've found to use DevkitARM as opposed to the older DevkitADV). After such a slow start I'm happy to have anything running at all. However, the tuturial has me include TONC's own header files and I'm not experienced enough of a C programmer to read through and discover the intracacies of it. Also I think all tuturials assume you have been programming C/C++ for a while and go right into lengthly programs which are hard to follow at my level. My question is... Is there just a straight documentation on what commands do what? I mean specific to GBA programming of course. Such as:

command name: MULTIBOOT
usage: MULTIBOOT()
purpose: Place before main() to initiate a multiboot cartridge setting on the GBA. No parameters.


I don't know if that's even the correct usage so feel free to correct me if it's not. I had these type of docs all over the place back in my BASIC days of the '80s. Does one exist like that for the GBA Devkit?

#40383 - tepples - Mon Apr 18, 2005 5:58 am

MULTIBOOT and int __gba_multiboot; are from the no-longer-maintained DevKit Advance. In devkitARM, the proper command is given on the gcc command line when linking the program: -specs=gba.specs for a ROM or -specs=gba_mb.specs for a multiboot.

__attribute__((aligned(4))) const char foo[8192] = { /*...*/ };
Aligns the start of the array to a 4-byte boundary. Use this for anything that will be copied to VRAM.

__attribute__((section (".ewram"),long_call)) int do_stuff(int x) { /*...*/ }
Puts the function in EWRAM.

__attribute__((section (".iwram"),long_call)) int mixer(void) { /*...*/ }
Puts the function in IWRAM.

__attribute__((section (".sbss"))) char foo[8192];
Puts the variable in EWRAM and initializes it to zero at program start. (By default, non-const variables are put in IWRAM.)
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#40408 - yaustar - Mon Apr 18, 2005 7:42 pm

That is actually a handy bit of info tepples.. any chance of it being in the FAQ soon?
_________________
[Blog] [Portfolio]

#40427 - tepples - Mon Apr 18, 2005 9:13 pm

Actually, most of that was already in the FAQ; I just had to update it for devkitARM (as opposed to DevKit Advance).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#40468 - killlerofangels - Tue Apr 19, 2005 3:19 am

Yes, thanks a lot. Very informative.