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.

Coding > enabling interupts in devkit advance?

#2413 - Psyk - Mon Feb 03, 2003 9:20 am

How do i do it? With GCC i'm supposed to alter crt0.s but i cant find that file in devkit advance.

#2414 - gb_feedback - Mon Feb 03, 2003 9:57 am

In my copy it's called boot.s

(ED: Sorry - answering the wrong question)


Last edited by gb_feedback on Mon Feb 03, 2003 6:40 pm; edited 1 time in total

#2415 - imikeyi - Mon Feb 03, 2003 11:18 am

You need to add your own version of crt0.s, and link it into your code instead of the default crt0. Download the one on devrs.com/gba

Then link like this:
arm-agb-elf-gcc -nostartfiles -g crt0.o main.c -T lnkscript -o main.elf
arm-agb-elf-objcopy -O binary main.elf main.gba

Where main.c is the file to compile.

Don't forget to assemble crt0.s into crt0.o first though:
arm-agb-elf-as -o crt0.o crt0.s
_________________
microkernel advance

#2425 - Psyk - Mon Feb 03, 2003 7:32 pm

But I cant find the original crt0.s, its not there.

#2426 - MayFly - Mon Feb 03, 2003 7:44 pm

You can find Jeff's crt0.s file here:

http://www.devrs.com/gba/ccode.php#cmisc

Click on the Crtls v1.28 link, and you'll be downloading the Crt0.s (and linkscript) in no time.

MayFly