Incorporate review changes
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
static void *sHeapStart;
|
static void *sHeapStart;
|
||||||
static u32 sHeapSize;
|
static u32 sHeapSize;
|
||||||
|
|
||||||
__attribute__((section("__EWRAM_HEAP"))) u8 gHeap[HEAP_SIZE] = {0};
|
EWRAM_DATA u8 gHeap[HEAP_SIZE] = {0};
|
||||||
|
|
||||||
#define MALLOC_SYSTEM_ID 0xA3A3
|
#define MALLOC_SYSTEM_ID 0xA3A3
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,8 @@
|
|||||||
|
|
||||||
#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr)
|
#define TRY_FREE_AND_SET_NULL(ptr) if (ptr != NULL) FREE_AND_SET_NULL(ptr)
|
||||||
|
|
||||||
// 122 KB. Max size of the heap without running into other data
|
|
||||||
#define HEAP_SIZE 0x1C000
|
#define HEAP_SIZE 0x1C000
|
||||||
extern u8 gHeap[];
|
extern u8 gHeap[HEAP_SIZE];
|
||||||
|
|
||||||
void *Alloc(u32 size);
|
void *Alloc(u32 size);
|
||||||
void *AllocZeroed(u32 size);
|
void *AllocZeroed(u32 size);
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ MEMORY
|
|||||||
{
|
{
|
||||||
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
||||||
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
||||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 16M
|
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modify the following load addresses as needed to make more room. Alternately, delete both the
|
/* Modify the following load addresses as needed to make more room. Alternately, delete both the
|
||||||
@@ -21,11 +21,9 @@ SECTIONS {
|
|||||||
ewram 0x2000000 (NOLOAD) :
|
ewram 0x2000000 (NOLOAD) :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
*(__EWRAM_HEAP);
|
|
||||||
|
|
||||||
INCLUDE "sym_ewram.ld"
|
INCLUDE "sym_ewram.ld"
|
||||||
src/*.o(ewram_data); /**/
|
src/*.o(ewram_data);
|
||||||
gflib/*.o(ewram_data); /**/
|
gflib/*.o(ewram_data);
|
||||||
|
|
||||||
*libc.a:impure.o(.data);
|
*libc.a:impure.o(.data);
|
||||||
*libc.a:locale.o(.data);
|
*libc.a:locale.o(.data);
|
||||||
|
|||||||
@@ -3,12 +3,11 @@ ENTRY(Start)
|
|||||||
gNumMusicPlayers = 4;
|
gNumMusicPlayers = 4;
|
||||||
gMaxLines = 0;
|
gMaxLines = 0;
|
||||||
|
|
||||||
/* Memory Spaces */
|
|
||||||
MEMORY
|
MEMORY
|
||||||
{
|
{
|
||||||
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
EWRAM (rwx) : ORIGIN = 0x2000000, LENGTH = 256K
|
||||||
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
IWRAM (rwx) : ORIGIN = 0x3000000, LENGTH = 32K
|
||||||
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 16M
|
ROM (rx) : ORIGIN = 0x8000000, LENGTH = 32M
|
||||||
}
|
}
|
||||||
|
|
||||||
SECTIONS {
|
SECTIONS {
|
||||||
@@ -16,10 +15,8 @@ SECTIONS {
|
|||||||
ewram 0x2000000 (NOLOAD) :
|
ewram 0x2000000 (NOLOAD) :
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
{
|
{
|
||||||
*(__EWRAM_HEAP);
|
src/*.o(ewram_data);
|
||||||
|
gflib/*.o(ewram_data);
|
||||||
src/*.o(ewram_data); /**/
|
|
||||||
gflib/*.o(ewram_data); /**/
|
|
||||||
} > EWRAM
|
} > EWRAM
|
||||||
|
|
||||||
iwram 0x3000000 (NOLOAD) :
|
iwram 0x3000000 (NOLOAD) :
|
||||||
@@ -31,13 +28,11 @@ SECTIONS {
|
|||||||
*libc.a:*.o(.bss*);
|
*libc.a:*.o(.bss*);
|
||||||
*libnosys.a:*.o(.bss*);
|
*libnosys.a:*.o(.bss*);
|
||||||
|
|
||||||
/* .bss.code starts at 0x3001AA8 */
|
|
||||||
src/m4a.o(.bss.code);
|
src/m4a.o(.bss.code);
|
||||||
|
|
||||||
/* COMMON starts at 0x30022A8 */
|
src/*.o(COMMON);
|
||||||
src/*.o(COMMON); /**/
|
gflib/*.o(COMMON);
|
||||||
gflib/*.o(COMMON); /**/
|
*libc.a:*.o(COMMON);
|
||||||
*libc.a:*.o(COMMON);
|
|
||||||
*libnosys.a:*.o(COMMON);
|
*libnosys.a:*.o(COMMON);
|
||||||
} > IWRAM
|
} > IWRAM
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
.include "gflib/malloc.o"
|
||||||
.include "src/decompress.o"
|
.include "src/decompress.o"
|
||||||
.include "src/main.o"
|
.include "src/main.o"
|
||||||
.include "gflib/window.o"
|
.include "gflib/window.o"
|
||||||
|
|||||||
Reference in New Issue
Block a user