diff --git a/arm9/Makefile b/arm9/Makefile index 1cb8c26..2d73e62 100644 --- a/arm9/Makefile +++ b/arm9/Makefile @@ -38,7 +38,7 @@ CFLAGS += $(INCLUDE) -DARM9 -D_NO_BOOTSTUB_ CXXFLAGS := $(CFLAGS) -fno-exceptions -std=gnu++11 ASFLAGS := -g $(ARCH) -LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) +LDFLAGS = -specs=../ds_arm9_hi.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) #--------------------------------------------------------------------------------- # any extra libraries we wish to link with the project (order is important) diff --git a/arm9/ds_arm9_hi.mem b/arm9/ds_arm9_hi.mem new file mode 100644 index 0000000..f4522da --- /dev/null +++ b/arm9/ds_arm9_hi.mem @@ -0,0 +1,11 @@ +/*-------------------------------------------------------------------------------- + This Source Code Form is subject to the terms of the Mozilla Public License, + v. 2.0. If a copy of the MPL was not distributed with this file, You can + obtain one at https://mozilla.org/MPL/2.0/. +--------------------------------------------------------------------------------*/ +MEMORY { + ewram : ORIGIN = 0x02004000, LENGTH = 3M + 512K - 0x4000 + dtcm : ORIGIN = 0x0b000000, LENGTH = 16K + vectors : ORIGIN = 0x01000000, LENGTH = 256 + itcm : ORIGIN = 0x01000100, LENGTH = 32K - 256 +} diff --git a/arm9/ds_arm9_hi.specs b/arm9/ds_arm9_hi.specs new file mode 100644 index 0000000..c5d66ea --- /dev/null +++ b/arm9/ds_arm9_hi.specs @@ -0,0 +1,8 @@ +%rename link old_link + +*link: +%(old_link) -T ../ds_arm9_hi.mem%s -T ds_arm9.ld%s --gc-sections + +*startfile: +ds_arm9_crt0%O%s crti%O%s crtbegin%O%s + diff --git a/bootloader/source/arm9clear.arm.c b/bootloader/source/arm9clear.arm.c index c08809e..9a076f9 100644 --- a/bootloader/source/arm9clear.arm.c +++ b/bootloader/source/arm9clear.arm.c @@ -35,8 +35,8 @@ void __attribute__ ((long_call)) __attribute__((naked)) __attribute__((noreturn) VRAM_CR = (VRAM_CR & 0xffff0000) | 0x00008080 ; - u16 *mainregs = (u16*)0x04000000; - u16 *subregs = (u16*)0x04001000; + vu16 *mainregs = (vu16*)0x04000000; + vu16 *subregs = (vu16*)0x04001000; for (i=0; i<43; i++) { mainregs[i] = 0;