nds/arm7/arm7.lds
Zack Buhman 62d6a3b2a6 arm7: copy to exclusive internal ram
Before this commit, attempting to start the rom on real NDS/DSi
hardware would result in the display of a solid white screen, with
no apparent evidence of the arm9 program running.

After much testing, I found that this issue was directly caused "main
mmeory" bus contention. Because arm7 and arm9 are both attempting to
read instructions from ewram at the same time, and arm9 bus access
stalls completely.

I also found that this could not be mitigated with giving arm9
priority in EXMEMCNT.

The solution appears to be to relocate arm7 code execution from
main/shared memory to an arm7-internal memory.

After this commit, the examples now function as intended on real
NDS/DSi hardware.
2024-09-10 12:16:19 -05:00

54 lines
1006 B
Plaintext

OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm)
MEMORY
{
main_memory : ORIGIN = 0x02390000, LENGTH = 256K
arm7_exclusive_internal_work_ram : ORIGIN = 0x03800000, LENGTH = 64K
}
SECTIONS
{
. = ORIGIN(arm7_exclusive_internal_work_ram);
.text ALIGN(4) :
{
KEEP(*(.text.start))
*(.text)
*(.text.*)
. = ALIGN(32);
} >arm7_exclusive_internal_work_ram AT>main_memory
.data ALIGN(4) :
{
*(.data)
*(.data.*)
} >arm7_exclusive_internal_work_ram AT>main_memory
.rodata ALIGN(4) :
{
*(.rodata)
*(.rodata.*)
} >arm7_exclusive_internal_work_ram AT>main_memory
.ctors ALIGN(4) :
{
KEEP(*(.ctors))
KEEP(*(.ctors.*))
} >arm7_exclusive_internal_work_ram AT>main_memory
.bss ALIGN(4) (NOLOAD) :
{
*(.bss)
*(.bss.*)
*(COMMON)
} >arm7_exclusive_internal_work_ram
/DISCARD/ :
{
*(.glue_7) *(.glue_7t) *(.vfp11_veneer) *(.v4_bx)
}
INCLUDE "../debug.lds"
}
INCLUDE "../symbols.lds"