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 > Devkitadv won't compile, please help.

#32752 - Elowen - Sat Dec 25, 2004 8:20 pm

I am running suse 9.1 and I can't get devkitadv to work on my computer. I have gotten it to work on suse 7.3 nad on windows 2000, but I can't get itto work on my computer now. Every time I try to compile I get this message:

Quote:
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/bin/ld: section .iwram [080003e4 -> 080004ab] overlaps section .init [080003d0 -> 080003eb]
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/lib/crt0.o: In function `jump_intr':
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/lib/crt0.o(.iwram+0xc4): undefined reference to `IntrTable'
collect2: ld returned 1 exit status
./makerom: line 4: /usr/local/devkitadv/arm-agb-elf/bin/objcopy: No such file or directory


or this message:

Quote:
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/bin/ld: section .iwram [080003e4 -> 080004ab] overlaps section .init [080003d0 -> 080003eb]
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/lib/crt0.o: In function `jump_intr':
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/lib/crt0.o(.iwram+0xc4): undefined reference to `IntrTable'
collect2: ld returned 1 exit status
/usr/local/devkitadv/bin/arm-agb-elf-objcopy: Test.elf: No such file or directory


I have no idea how to fix this.

#32763 - valefor - Mon Dec 27, 2004 2:18 pm

You should check if the file '/usr/local/devkitadv/arm-agb-elf/bin/objcopy' exist.
For the first part of your message it would be usefull for us to see what is the command that produce that error.

#32769 - Cearn - Mon Dec 27, 2004 4:51 pm

Quote:

/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/lib/crt0.o: In function `jump_intr':
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/lib/crt0.o(.iwram+0xc4): undefined reference to `IntrTable'


For the use of interrupts it is common to have an interrupt table where you can put the addresses of your interrupt service routines. This is usually called IntrTable, and you're supposed to supply one yourself. It's usually defines something like this:
Code:

typedef void (*fnptr)(void);

void int_dummy() {}

fnptr IntrTable[14]=
   int_dummy,      // INT_VBLANK
   int_dummy,      // INT_HBLANK
   int_dummy,      // INT_VCOUNT
   int_dummy,      // INT_TM0
   int_dummy,      // INT_TM1
   int_dummy,      // INT_TM2
   int_dummy,      // INT_TM3
   int_dummy,      // INT_COM
   int_dummy,      // INT_DMA0
   int_dummy,      // INT_DMA1
   int_dummy,      // INT_DMA2
   int_dummy,      // INT_DMA3
   int_dummy,      // INT_KEYS
   int_dummy,      // INT_CART
};

The tutorials should show how you can properly use the IntrTable, but this should at least allow you to compile the code. (Actually, I think you could probably make due with any kind of symbol named IntrTable, but something of this structure is expected)

Quote:
/usr/local/devkitadv/lib/gcc-lib/arm-agb-elf/3.1/../../../../arm-agb-elf/bin/ld: section .iwram [080003e4 -> 080004ab] overlaps section .init [080003d0 -> 080003eb]

I'm guessing, but I think you have a f#^%d up linkscript here. An iwram section in the 08000000 range is just wrong. You can try rewriting the linkscript or getting a new one (good luck finding the right one to replace, btw :P )
Or might try devkitARM, which is more recent, faster and should have neither of these two problems. Just be sure to ALWAYS compile with -mthumb-interwork and link with either -specs=gba.specs or spec=gba_mb.specs. See the downloadable samples on the site for details.

#33002 - Elowen - Thu Dec 30, 2004 12:43 am

thank you installed devkitarm and compiled with the commands that you gave me and it worked.: