Anyone deving for Gameboy advance, with gcc? I need help:'(

Started by
5 comments, last by arsenius 22 years, 11 months ago
Is anyone here developing for Gameboy advance with gcc in windows? I can''t figure out how to set up/use arm gcc. I tried to follow other people''s descriptions of how to set it up, but it isn''t working. Thanks in advance. -arsenius ''after three days without programming, life becomes meaningless'' -The Tao of Programming
Advertisement
I dont currently make things for GBA so i can''t help you there, but where can i get information on doing this as im also intrested :D
PsYvIsIoN
Here are some links that seem to be good


www.agbdev.net
gbadev.org
http://www.devrs.com/gba/

Hope these help


ps I am going to start looking into this properly soon as it looks really cool

regards,

Paul
--As Cunning as a fox that has just been appointed professor of cunning at oxford university
Yeah, i''ve been to those sites already, and they have some information, but not what I need. I need help learning how to set up gcc for arm, so that I can compile things I know I could use the official arm compiler, and it produces code, but i''d rather like to use something legal (the arm compiler is a 60 day trial, but the sites circulate a crack)

anyone interested, there is a tutorial in the works at
the Pern Project
of course, it explains how to set up the compiler i''m trying to avoid using




-arsenius
''after three days without programming, life becomes meaningless'' -The Tao of Programming
I''m using GCC but I didn''t have any problems running it.
You have to put the following line in your autoexec.bat:
PATH=C:\Gba\dev\armgcc;%path%

replace the directory where you''ve put your compiler in.
when you want to compile something, you have to be in DOS (or DOS-box) and run gcc or use makefiles (which is much more convenient)
--------------------------Programmers don't byte, they nibble a bit. Unknown Person-------------------------
thanks, i''ll try that
could you explain about makefiles? What do they do, how do you use them, do you have to create a new makefile for each new project, and anything else you think might be helpful?
thanks


-arsenius
''after three days without programming, life becomes meaningless'' -The Tao of Programming
I''m not an expert when it comes to makefiles, but I''ll do my best. This is what my makefile looks like (and don''t include the comments I''ve put in it):

_AGBINC = C:\Emu\Gba\dev\armgcc\include
_AGBLIB = C:\Emu\Gba\dev\armgcc\lib

/* These variables are used later in the makefile. _AGBINC will tell the compiler where it can find the include-files, _AGBLIB will tell where the libraries are.
*/

.CFILES = main.c

// This line makes sure main.c will be compiled

.OFILES = C:\Emu\Gba\dev\armgcc\gfxlib\crt0.o $(.CFILES:.c=.o)

// This is for including an object file I use.

CFLAGS = -g -O2 -I$(_AGBINC) -mthumb-interwork \
-nostdlib -Wall -save-temps -fverbose-asm

/* These are the flags used when compiling all the code. You can see here that _AGBINC is used here to tell where the header-files are. */

LDFLAGS += -Map $(MAPFILE) -nostartfiles \
-Ttext 0x08000000 -Tbss 0x03000000 \
-L$(_AGBLIB) \
-L. \
-Tlnkscript

//These are the flags used when linking everything together.

MAPFILE = fruit.map
TARGET_ELF = fruit.elf
TARGET_BIN = fruit.bin

/* TARGET_BIG specifies the file that can be run with the emulators */

$(TARGET_BIN): $(TARGET_ELF)
objcopy -v -O binary $< $@

$(TARGET_ELF): $(.OFILES) Makefile $(.AFILES)
@echo > $(MAPFILE)
$(CC) -g -o $@ $(.OFILES) -Wl,$(LDFLAGS)

.PHONY: all clean depend data

all: clean depend data $(TARGET_BIN)

clean:
# -rm $(.OFILES)
clean_data:
$(foreach .ADIR_TMP, $(dir $(.AFILES)), make -C $(.ADIR_TMP) clean

.SUFFIXES: .s .c .o .a

You don''t really need to know what the rest of the makefile is used for (I don''t know it too), it just works.

I hope you found this helpful.
--------------------------Programmers don't byte, they nibble a bit. Unknown Person-------------------------

This topic is closed to new replies.

Advertisement