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.
54 lines
736 B
Plaintext
54 lines
736 B
Plaintext
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
|
|
OUTPUT_ARCH(arm)
|
|
MEMORY
|
|
{
|
|
ram : ORIGIN = 0x02000000, LENGTH = 4M
|
|
}
|
|
SECTIONS
|
|
{
|
|
. = ORIGIN(ram);
|
|
|
|
.text ALIGN(4) :
|
|
{
|
|
KEEP(*(.text.start))
|
|
*(.text)
|
|
*(.text.*)
|
|
*(.glue_7t)
|
|
*(.glue_7)
|
|
*(.vfp11_veneer)
|
|
*(.v4_bx)
|
|
} > ram
|
|
|
|
.data ALIGN(4) :
|
|
{
|
|
*(.data)
|
|
*(.data.*)
|
|
} > ram
|
|
|
|
.rodata ALIGN(4) :
|
|
{
|
|
*(.rodata)
|
|
*(.rodata.*)
|
|
} > ram
|
|
|
|
.ctors ALIGN(4) :
|
|
{
|
|
KEEP(*(.ctors))
|
|
KEEP(*(.ctors.*))
|
|
} > ram
|
|
|
|
.bss ALIGN(4) (NOLOAD) :
|
|
{
|
|
*(.bss)
|
|
*(.bss.*)
|
|
*(COMMON)
|
|
} > ram
|
|
|
|
INCLUDE "../debug.lds"
|
|
}
|
|
|
|
INCLUDE "../symbols.lds"
|
|
INCLUDE "addresses.lds"
|
|
|
|
__stack_end = ORIGIN(ram) + LENGTH(ram) - 4;
|