#53791 - xflash - Sun Sep 11, 2005 11:58 pm
Hello,
I'm currently porting some existing win32 code on the DS. I first try to compile my C++ code "as is".
After 2 or 3 liters of coffee, and a sleepless night, I succeed in it.
But my code crashs on some NULL return memory allocations.
While having read on this site all the concern met with malloc, I choose to replace thoses malloc with some static arrays.
Before:
After:
The problem is on the link phase. The linker couldn't place my code in Ewram I think. I've got this error :
What can I do? What is the limit of the binaries size to be loaded in EWram ?
I already use GBFS (great thanks to Damian Yerrick!!!) to include some heavy datas (near 6MB).
Isn't there other memory range where I could place some big temp arrays ? iwram ? the internal DS cache range ?
Thanks for your help !
xFlasH
I'm currently porting some existing win32 code on the DS. I first try to compile my C++ code "as is".
After 2 or 3 liters of coffee, and a sleepless night, I succeed in it.
But my code crashs on some NULL return memory allocations.
While having read on this site all the concern met with malloc, I choose to replace thoses malloc with some static arrays.
Before:
Code: |
uint8* _itemArray;
(...) _itemArray = (uint8*)malloc(MAX_ITEMS); |
After:
Code: |
uint8 _itemArray[MAX_ITEMS];
|
The problem is on the link phase. The linker couldn't place my code in Ewram I think. I've got this error :
Code: |
ld.exe: address 0x28006e8 of Test_08.arm9.elf section .bss is not within region ewram |
What can I do? What is the limit of the binaries size to be loaded in EWram ?
I already use GBFS (great thanks to Damian Yerrick!!!) to include some heavy datas (near 6MB).
Isn't there other memory range where I could place some big temp arrays ? iwram ? the internal DS cache range ?
Thanks for your help !
xFlasH