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 > Compile Problem

#76211 - naleksiev - Sun Mar 19, 2006 3:37 pm

Hello I have a problem compiling my application because I have very big resource (..\DictData.s). If I make my resource smaller everything is fine, but the file that I need to add is 737KB.

Is there a way to compile my game with such resource?

This is what my make files says.

Code:
        D:\GbaDev\devkitPro\devkitARM\bin\arm-elf-g++.exe -o ..\..\build\MyAppAd
vanced.elf MyApp.obj  Debug.obj  ..\Dictionary.obj ..\DictData.s -mthumb -mthumb
-interwork -specs=gba_mb.specs -LD:\GbaDev\devkitPro\devkitARM\arm-elf\lib\inter
work -LD:\GbaDev\devkitPro\libgba\lib
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: region ewram is full (..\..\build\MyAppAdvanced.elf section .rodata)
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: section .ctors [02000000 -> 02000007] overlaps section .init [0200000
0 -> 02000237]
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: section .dtors [02000008 -> 0200000f] overlaps section .init [0200000
0 -> 02000237]
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: section .jcr [02000010 -> 02000013] overlaps section .init [02000000
-> 02000237]
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: section .eh_frame [02000014 -> 02000017] overlaps section .init [0200
0000 -> 02000237]
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: section .data [02000018 -> 0200001f] overlaps section .init [02000000
 -> 02000237]
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: ..\..\build\MyAppAdvanced.elf: section .init lma 0x2000000 overlaps p
revious sections
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: ..\..\build\MyAppAdvanced.elf: section .dtors lma 0x2000008 overlaps
previous sections
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: ..\..\build\MyAppAdvanced.elf: section .jcr lma 0x2000010 overlaps pr
evious sections
d:\gbadev\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-elf\b
in\ld.exe: ..\..\build\MyAppAdvanced.elf: section .eh_frame lma 0x2000014 overla
ps previous sections
NMAKE : fatal error U1077: 'D:\GbaDev\devkitPro\devkitARM\bin\arm-elf-g++.exe' :
 return code '0x1'
Stop.

#76272 - Cearn - Mon Mar 20, 2006 12:29 am

You're compiling for multiboot (-specs=gba_mb.specs), which has a 256kb maximum. Compile as a cart binary (-specs=gba.specs) and this problem should go away.

#76273 - Touchstone - Mon Mar 20, 2006 12:34 am

Uhm, I'm not sure if I understand the error messages correctly but it seems like your constant data end up in EWRAM, which is only 256 KB. (Or is it? I can't remember. Anyways, it's way smaller than 737 KB)

If this is the case then you need to make sure that your constant data end up in ROM. This is done in your linker scripts.

That said, it seems like you are trying to build a multiboot executable. If this is the case then your constants SHOULD end up in EWRAM, which means you can't have more data than what fits in EWRAM. (This is because of how multiboot files work)
_________________
You can't beat our meat

#76277 - tepples - Mon Mar 20, 2006 3:23 am

If you are using multiboot because it's the only thing that works with GBAMP, then you need to redesign your program to work with Chishm's file system code.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#76280 - naleksiev - Mon Mar 20, 2006 3:30 am

Thanks guys.

Everything is fine now. I used gba_mb.specs because I didn't know that there is another one. I don't use GBAMP :)


Thank you again.