2008-03-13 03:48:23 +00:00
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
ENTRY(start)
|
|
|
|
|
|
|
|
OUTPUT_FORMAT(elf32-littlearm)
|
|
|
|
OUTPUT_ARCH(arm)
|
2008-04-29 06:19:32 +00:00
|
|
|
STARTUP(target/arm/imx31/crt0.o)
|
2008-03-13 03:48:23 +00:00
|
|
|
|
|
|
|
#define PLUGINSIZE PLUGIN_BUFFER_SIZE
|
|
|
|
#define CODECSIZE CODEC_SIZE
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define STUBOFFSET 0x10000
|
|
|
|
#else
|
|
|
|
#define STUBOFFSET 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "imx31l.h"
|
|
|
|
/* Subtract 1MB for the FRAME/TTB section */
|
|
|
|
#define DRAMSIZE (MEMORYSIZE * 0x100000 - 0x100000) - PLUGINSIZE - STUBOFFSET - CODECSIZE
|
|
|
|
|
|
|
|
#define DRAMORIG (0x0 + STUBOFFSET)
|
|
|
|
/* #define IRAMORIG 0x1FFFC000 */
|
|
|
|
#define IRAMORIG DRAMORIG
|
|
|
|
#define IRAM DRAM
|
2008-04-18 16:42:50 +00:00
|
|
|
#define IRAMSIZE IRAM_SIZE
|
2008-03-13 03:48:23 +00:00
|
|
|
|
|
|
|
/* End of the audio buffer, where the codec buffer starts */
|
|
|
|
#define ENDAUDIOADDR (DRAMORIG + DRAMSIZE)
|
|
|
|
|
|
|
|
/* Where the codec buffer ends, and the plugin buffer starts */
|
|
|
|
#define ENDADDR (ENDAUDIOADDR + CODECSIZE)
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
|
|
|
DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
|
2009-02-07 10:09:13 +00:00
|
|
|
DEVBSS : ORIGIN = CSD0_BASE_ADDR + (MEMORYSIZE * 0x100000 - 0x100000), \
|
|
|
|
LENGTH = 0x100000 - FRAME_SIZE - TTB_SIZE
|
2008-03-13 03:48:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
loadaddress = .;
|
|
|
|
_loadaddress = .;
|
|
|
|
. = ALIGN(0x200);
|
|
|
|
*(.init.text)
|
|
|
|
*(.text*)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.icode)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(.glue_7)
|
|
|
|
*(.glue_7t)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
.rodata :
|
|
|
|
{
|
|
|
|
*(.rodata) /* problems without this, dunno why */
|
|
|
|
*(.rodata*)
|
|
|
|
*(.rodata.str1.1)
|
|
|
|
*(.rodata.str1.4)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.irodata)
|
2008-03-13 03:48:23 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
|
|
|
|
/* Pseudo-allocate the copies of the data sections */
|
|
|
|
_datacopy = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
/* TRICK ALERT! For RAM execution, we put the .data section at the
|
|
|
|
same load address as the copy. Thus, we don't waste extra RAM
|
|
|
|
when we don't actually need the copy. */
|
|
|
|
.data : AT ( _datacopy )
|
|
|
|
{
|
|
|
|
_datastart = .;
|
|
|
|
*(.data*)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.idata)
|
2008-03-13 03:48:23 +00:00
|
|
|
. = ALIGN(0x4);
|
|
|
|
_dataend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
|
|
|
/DISCARD/ :
|
|
|
|
{
|
|
|
|
*(.eh_frame)
|
|
|
|
}
|
|
|
|
|
|
|
|
.vectors 0x0 :
|
|
|
|
{
|
|
|
|
_vectorsstart = .;
|
|
|
|
*(.vectors);
|
|
|
|
_vectorsend = .;
|
|
|
|
} AT> DRAM
|
|
|
|
|
|
|
|
_vectorscopy = LOADADDR(.vectors);
|
2009-02-10 11:34:15 +00:00
|
|
|
|
|
|
|
.stack (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
*(.stack)
|
|
|
|
stackbegin = .;
|
|
|
|
. += 0x2000;
|
|
|
|
stackend = .;
|
|
|
|
} > DRAM
|
2009-02-10 11:34:15 +00:00
|
|
|
|
|
|
|
_sdmacodecopy = stackbegin;
|
2008-03-13 03:48:23 +00:00
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.bss (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
_edata = .;
|
|
|
|
*(.bss*)
|
2008-05-10 22:03:45 +00:00
|
|
|
*(.ibss)
|
2008-03-13 03:48:23 +00:00
|
|
|
*(COMMON)
|
|
|
|
. = ALIGN(0x4);
|
|
|
|
_end = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.audiobuf (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
2009-02-10 11:34:15 +00:00
|
|
|
. = ALIGN(0x4);
|
2008-03-13 03:48:23 +00:00
|
|
|
_audiobuffer = .;
|
|
|
|
audiobuffer = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.audiobufend ENDAUDIOADDR (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
audiobufend = .;
|
|
|
|
_audiobufend = .;
|
|
|
|
} > DRAM
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.codec ENDAUDIOADDR (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
codecbuf = .;
|
|
|
|
_codecbuf = .;
|
|
|
|
}
|
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.plugin ENDADDR (NOLOAD) :
|
2008-03-13 03:48:23 +00:00
|
|
|
{
|
|
|
|
_pluginbuf = .;
|
|
|
|
pluginbuf = .;
|
|
|
|
}
|
2008-04-18 16:42:50 +00:00
|
|
|
|
2009-02-10 11:34:15 +00:00
|
|
|
.sdma _pluginbuf : AT( _sdmacodecopy )
|
|
|
|
{
|
|
|
|
_sdmacodestart = .;
|
|
|
|
*(.sdmacode);
|
|
|
|
_sdmacodeend = .;
|
|
|
|
}
|
|
|
|
|
2008-04-18 16:42:50 +00:00
|
|
|
.devbss (NOLOAD) :
|
|
|
|
{
|
|
|
|
_devbssdata = .;
|
2008-04-20 18:43:47 +00:00
|
|
|
*(.qharray)
|
2008-04-18 16:42:50 +00:00
|
|
|
*(.devbss*)
|
|
|
|
_devbssend = .;
|
|
|
|
} > DEVBSS
|
2008-03-13 03:48:23 +00:00
|
|
|
}
|
|
|
|
|