/***********************************************************************/
/*                                                                     */
/***********************************************************************/

ENTRY(__reset)

STACK_SIZE = 0x400;

/* Memory Definitions */

MEMORY
{
	ROM (rx) : ORIGIN = 0x00050000,    LENGTH = 0x0003E000
	RAM (rw) : ORIGIN = 0x10007200,    LENGTH = 0x00000E00
}



SECTIONS
{
	__ROM_segment_start__ = 0x00050000;
	__ROM_segment_end__   = __ROM_segment_start__ + 0x0003E000;

	__code_load_start__ = ALIGN(__ROM_segment_start__ , 4);
	CODE ALIGN(__ROM_segment_start__ , 4) :
		{
		__code_start_temp__ = .;
		__code_start__ = .;
		*(.text .text.* .rodata.* ._iconst .bss  .glue_7t .glue_7 .gnu.linkonce.t.* .gcc_except_table)
		}
	__code_end__ = __code_start_temp__ + SIZEOF(CODE);

	__SRAM_segment_start__ = 0x10007200;
	__SRAM_segment_end__   = __SRAM_segment_start__ + 0x00000E00;
	__RAM_START = __SRAM_segment_start__;

	__zdata_load_start__ = ALIGN(__SRAM_segment_start__ , 4);
	._zdata ALIGN(__SRAM_segment_start__ , 4) (NOLOAD) :
		{
		__zdata_start__ = .;
		*(._zdata)
		}
	__zdata_end__ = __zdata_start__ + SIZEOF(._zdata);


	__data_load_start__ = ALIGN(__zdata_end__ , 4);
	.data ALIGN(__zdata_end__ , 4) (NOLOAD) :
		{
		__data_start__ = .;
		*(.data)
		}
	__data_end__ = __data_start__ + SIZEOF(.data);


	__idata_load_start__ = ALIGN(__data_end__ , 4);
	._idata ALIGN(__data_end__ , 4) (NOLOAD) :
		{
		__idata_start__ = .;
		*(._idata)
		}
	__idata_end__ = __idata_start__ + SIZEOF(._idata);


	__rdata_load_start__ = ALIGN(__idata_end__ , 4);
	._rdata ALIGN(__idata_end__ , 4) (NOLOAD) :
		{
		__rdata_start__ = .;
		*(._rdata)
		}
	__rdata_end__ = __rdata_start__ + SIZEOF(._rdata);


	__bss_load_start__ = ALIGN(__rdata_end__ , 4);
	.bss ALIGN(__rdata_end__ , 4) (NOLOAD) :
		{
		__bss_start__ = .;
		*(._rdata)
		}
	__bss_end__ = __bss_start__ + SIZEOF(.bss);


	__common_load_start__ = ALIGN(__bss_end__ , 4);
	COMMON ALIGN(__bss_end__ , 4) (NOLOAD) :
		{
		__common_start__ = .;
		*(COMMON)
		}
	__common_end__ = __common_start__ + SIZEOF(COMMON);


__RAM_END = __common_end__;
}
