2021-02-27 22:08:58 +00:00
|
|
|
#include "config.h"
|
2021-04-26 21:57:31 +00:00
|
|
|
#include "cpu.h"
|
2021-02-27 22:08:58 +00:00
|
|
|
|
|
|
|
OUTPUT_FORMAT("elf32-littlemips")
|
|
|
|
OUTPUT_ARCH(MIPS)
|
|
|
|
ENTRY(_start)
|
|
|
|
STARTUP(target/mips/ingenic_x1000/crt0.o)
|
|
|
|
|
|
|
|
/* End of the audio buffer, where the codec buffer starts */
|
2021-04-26 21:57:31 +00:00
|
|
|
#define ENDAUDIOADDR (X1000_DRAM_END - PLUGIN_BUFFER_SIZE - CODEC_SIZE)
|
2021-02-27 22:08:58 +00:00
|
|
|
|
|
|
|
/* Where the codec buffer ends, and the plugin buffer starts */
|
|
|
|
#define ENDCODECADDR (ENDAUDIOADDR + CODEC_SIZE)
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2021-04-26 21:57:31 +00:00
|
|
|
IRAM : ORIGIN = X1000_IRAM_BASE, LENGTH = X1000_IRAM_SIZE
|
|
|
|
DRAM : ORIGIN = X1000_DRAM_BASE, LENGTH = X1000_DRAM_SIZE
|
2021-02-27 22:08:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
loadaddress = .;
|
|
|
|
_loadaddress = .;
|
|
|
|
*(.init.text);
|
|
|
|
*(.text*);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata*);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
.data :
|
|
|
|
{
|
|
|
|
*(.data*);
|
|
|
|
*(.sdata*);
|
|
|
|
} > DRAM
|
|
|
|
|
2021-04-26 21:57:31 +00:00
|
|
|
.iram X1000_IRAM_BASE: AT (_bssbegin)
|
2021-02-27 22:08:58 +00:00
|
|
|
{
|
|
|
|
_iramstart = .;
|
|
|
|
. = 0x000; /* TLB refill */
|
|
|
|
KEEP(*(.vectors.1));
|
|
|
|
. = 0x100; /* Cache error */
|
|
|
|
KEEP(*(.vectors.2));
|
|
|
|
. = 0x180; /* General exception */
|
|
|
|
KEEP(*(.vectors.3));
|
|
|
|
. = 0x200; /* Interrupt */
|
|
|
|
KEEP(*(.vectors.4));
|
|
|
|
KEEP(*(.vectors));
|
|
|
|
|
2021-04-25 12:43:58 +00:00
|
|
|
*(.icode*);
|
2021-02-27 22:08:58 +00:00
|
|
|
*(.irodata);
|
|
|
|
*(.idata);
|
|
|
|
_iramend = .;
|
|
|
|
} > IRAM
|
|
|
|
_iramcopy = LOADADDR(.iram);
|
|
|
|
|
|
|
|
. = ALIGN(4);
|
|
|
|
.stack (NOLOAD) :
|
|
|
|
{
|
|
|
|
*(.stack);
|
|
|
|
stackbegin = .;
|
2021-04-26 21:57:31 +00:00
|
|
|
. += X1000_STACKSIZE;
|
2021-02-27 22:08:58 +00:00
|
|
|
stackend = .;
|
|
|
|
_irqstackbegin = .;
|
2021-04-26 21:57:31 +00:00
|
|
|
. += X1000_IRQSTACKSIZE;
|
2021-02-27 22:08:58 +00:00
|
|
|
_irqstackend = .;
|
|
|
|
} > IRAM
|
|
|
|
|
|
|
|
.bss (NOLOAD) :
|
|
|
|
{
|
|
|
|
_bssbegin = .;
|
|
|
|
*(.sbss*);
|
|
|
|
*(.bss*);
|
|
|
|
*(COMMON);
|
|
|
|
*(.scommon*);
|
|
|
|
_bssend = .;
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.audiobuf :
|
|
|
|
{
|
2021-04-26 21:57:31 +00:00
|
|
|
. = ALIGN(4);
|
2021-02-27 22:08:58 +00:00
|
|
|
audiobuffer = .;
|
2021-04-26 21:57:31 +00:00
|
|
|
loadbuffer = .;
|
2021-02-27 22:08:58 +00:00
|
|
|
} > DRAM
|
|
|
|
|
2021-04-26 21:57:31 +00:00
|
|
|
loadbufferend = ENDAUDIOADDR;
|
2021-02-27 22:08:58 +00:00
|
|
|
audiobufend = ENDAUDIOADDR;
|
|
|
|
codecbuf = ENDAUDIOADDR;
|
|
|
|
pluginbuf = ENDCODECADDR;
|
|
|
|
|
|
|
|
/DISCARD/ :
|
|
|
|
{
|
2021-04-25 15:17:33 +00:00
|
|
|
*(.MIPS.abiflags);
|
2021-02-27 22:08:58 +00:00
|
|
|
*(.eh_frame);
|
|
|
|
*(.rel.dyn);
|
|
|
|
}
|
|
|
|
}
|