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.

DS development > ewram issues

#71156 - dj_yt - Fri Feb 10, 2006 6:33 pm

Hi there,

Was just messing around with some DS development. Started porting an emulator and get the following error when linking:

d:\coding\ds\devkitpro\devkitarm\bin\..\lib\gcc\arm-elf\4.0.2\..\..\..\..\arm-el
f\bin\ld.exe: address 0x259b380 of d:/coding/source
.elf section .bss is not within region ewram

I guess this means the code is too big to fit in the DS's 4mb of EWRAM...

What's the best way of determining how much over the mark I am? I want to know whether to optimise or give up on this project...

Thanks..

#71158 - wintermute - Fri Feb 10, 2006 6:57 pm

ewram on the DS runs from 0x02000000 to 0x02400000 although there's a 16k area at the top reserved for other things.

0x0259b380 - 0x02400000 = 0x019B380 which is around 1.6megs so you're a fair bit over.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog

#71177 - tepples - Fri Feb 10, 2006 8:56 pm

Do nm -n arm9.elf > memusage.txt and look over the result in Notepad.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.

#71260 - dj_yt - Sat Feb 11, 2006 2:19 pm

Thanks guys - I'll try those things out.

I was guessing I was 1.6mb over - guess the code was more bulky than I anticipated.