#81894 - knight0fdragon - Tue May 02, 2006 6:39 pm
g:\devkitpro\devkitarm\arm-elf\bin\ld.real.exe: address 0x381005c of g:/DSCode/template/template/arm7/template.arm7.elf section .data is not within region iwram
g:\devkitpro\devkitarm\arm-elf\bin\ld.real.exe: address 0x38113d4 of g:/DSCode/template/template/arm7/template.arm7.elf section .bss is not within region iwram
i get these two errors and I wonder what is causeing them.
I tried taking out variables to make it smaller, any other methods im not thinking of, or am i missing the point completely?
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#81895 - josath - Tue May 02, 2006 6:55 pm
so it seems you only get 64KB of data on the arm7 with the defaul devkitarm linker scripts.
ds_arm7.ld wrote: |
iwram : ORIGIN = 0x03800000, LENGTH = 64K |
It looks like you are only over by about 5KB, so you almost have it fitting. Are you compiling in data files into the arm7 binary? make sure you don't have any giant arrays or anything.
#81896 - knight0fdragon - Tue May 02, 2006 6:59 pm
its the new wifi lib doing it it seems
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#81897 - tepples - Tue May 02, 2006 7:00 pm
If you're using the default libnds linker script, link your audio files into the ARM9 binary and then IPC their addresses over to the ARM7 for playback. If you want to learn IPC before you get sampled sound to work, try getting the tone generators to work first.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#81903 - melw - Tue May 02, 2006 7:19 pm
I hit also the iwram limit after adding dswifi library to my projects. If you're using arm-g++ for compiling the arm7, an easy solution is to change to arm-gcc - arm7 binaries tend to be smaller and at least I didn't really use any C++ specific on that side anyways.
#81905 - tepples - Tue May 02, 2006 7:21 pm
Yeah, the exception and RTTI support brought in by g++ really bloats the binary. While compiling one of the drunkencoders examples (yay, I just made my first DS program!), I managed to shave a 100 KB .nds file to 7 KB merely by compiling it as C99 instead of C++.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#81907 - knight0fdragon - Tue May 02, 2006 7:27 pm
tepples wrote: |
If you're using the default libnds linker script, link your audio files into the ARM9 binary and then IPC their addresses over to the ARM7 for playback. If you want to learn IPC before you get sampled sound to work, try getting the tone generators to work first. |
This is what I did in the first place
Quote: |
I hit also the iwram limit after adding dswifi library to my projects. If you're using arm-g++ for compiling the arm7, an easy solution is to change to arm-gcc - arm7 binaries tend to be smaller and at least I didn't really use any C++ specific on that side anyways. |
how would i go about doing that in the make file?
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#81908 - ficedula - Tue May 02, 2006 7:30 pm
Seems like a change in devkitpro/gcc has triggered it too - the wifi library gives me this error too (compiling the ARM7 binary in C++ mode), but with devkitpro r17, the binary is fine; r18 and/or the new version of gcc in r18 seems to produce larger binaries for some reason.
(The ARM9 binary is larger, too, that just doesn't cause errors...)
#81909 - knight0fdragon - Tue May 02, 2006 7:41 pm
bah i dunno ill have to work something out
g:\devkitpro\devkitarm\arm-elf\bin\ld.real.exe: address 0x38101cc of g:/DSCode/template/template/arm7/template.arm7.elf section .data is not within region iwram
g:\devkitpro\devkitarm\arm-elf\bin\ld.real.exe: address 0x3811548 of g:/DSCode/template/template/arm7/template.arm7.elf section .bss is not within region iwram
thats what i got it knocked down to, any ideas on ways to make my file smaller? cant get it to compile in C for some odd reason
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#81942 - wintermute - Tue May 02, 2006 10:06 pm
Try adding -fno-exceptions -fno-rtti to CXXFLAGS in the arm7 makefile. Failing that you could try renaming the .cpp files to .c
I'm also considering using the switchable iwram purely for arm7 which would give us an extra 32k. FWIW Nintendo seem to do this for their arm7 binaries too and I don't think anyone has come up with a good use for that memory.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog
#81963 - knight0fdragon - Wed May 03, 2006 2:58 am
that seemed to work.... what is the dangers of doing this
_________________
http://www.myspace.com/knight0fdragonds
MK DS FC: Dragon 330772 075464
AC WW FC: Anthony SamsClub 1933-3433-9458
MPFH: Dragon 0215 4231 1206
#82007 - agentq - Wed May 03, 2006 11:58 am
wintermute, I'm using the switchable IWRAM in ScummVM on the ARM9 for some look-up tables, which really helps my performance, so it would be good if using the IWRAM as extra ARM7 RAM is optional.
#82013 - wintermute - Wed May 03, 2006 1:00 pm