Working around filling up the ewram?
Posted: Thu May 01, 2014 3:35 am
Hey everyone,
A while ago I decided I wanted to make a game demo using libNDS as I wanted some hands-on experience with C++. After some initial struggles getting my 3D models in, I now have a fully functional exporter that generates a custom-format .bin file. I can read it out just fine and everything works!
However, after just exporting another model I ran into the following linker error:
I was under the impression that any data included using "#include some_bin.h" would only store the pointers and keep the actual data outside the main memory, but if I undertand correctly this turns out not to be the case. I can't imagine one would be fully limited to only 4MB though? Am I missing something obvious? I'm aware I could use some optimization, especially on the texture side of things (everything's 16-bit raw), but is that all I can do? I feel like I'm going about this the wrong way somehow.
Thanks in advance,
Patrick
Sidenote: After I iron out a few more kinks I'd be happy to post the exporter + accompanying C++ class to GitHub should anyone be interested in it.
A while ago I decided I wanted to make a game demo using libNDS as I wanted some hands-on experience with C++. After some initial struggles getting my 3D models in, I now have a fully functional exporter that generates a custom-format .bin file. I can read it out just fine and everything works!
However, after just exporting another model I ran into the following linker error:
Code: Select all
linking spirit-master.elf
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: /devkitpro/homebrew/spirit-master/spirit-master.elf section `.rodata' will not fit in region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: address 0x24023fc of /devkitpro/homebrew/spirit-master/spirit-master.elf section `.ewram' is not within region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: address 0x2402ec8 of /devkitpro/homebrew/spirit-master/spirit-master.elf section `.data' is not within region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: address 0x2401f0c of /devkitpro/homebrew/spirit-master/spirit-master.elf section `.ewram' is not within region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: address 0x24029d8 of /devkitpro/homebrew/spirit-master/spirit-master.elf section `.data' is not within region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: address 0x2401f0c of /devkitpro/homebrew/spirit-master/spirit-master.elf section `.ewram' is not within region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: address 0x24029d8 of /devkitpro/homebrew/spirit-master/spirit-master.elf section `.data' is not within region `ewram'
/devkitpro/devkitARM/bin/../lib/gcc/arm-eabi/4.5.1/../../../../arm-eabi/bin/ld: region `ewram' overflowed by 14808 bytes
collect2: ld returned 1 exit status
Thanks in advance,
Patrick
Sidenote: After I iron out a few more kinks I'd be happy to post the exporter + accompanying C++ class to GitHub should anyone be interested in it.