ENTRY(_start)

/* description of memory regions */
MEMORY {
	FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
	RAM (rwx)  : ORIGIN = 0x20000000,  LENGTH = 96K
}

/* description of ELF sections */
SECTIONS {
	.text : {
		. = ALIGN(8);
		*(.vector_table)
		*(.text)
		*(.text*)
	} > FLASH

	/* read-only data sections */
	.rodata : {
		. = ALIGN(8);
		*(.rodata)
		*(.rodata*)
	} > FLASH

	/* initialized data */
	_sidata = LOADADDR(.data);
	.data : {
		. = ALIGN(8);
		_sdata = .;
		*(.data)
		*(.data*)
		. = ALIGN(8);
		_edata = .;
	} > RAM AT > FLASH

	/* uninitialized data */
	.bss : {
		. = ALIGN(8);
		_sbss = .;
		*(.bss)
		*(.bss*)
		. = ALIGN(8);
		_ebss = .;
	} > RAM

	.stack : {
		. = ALIGN(4);
		_bstack = .;
                . += 2048;
		_tstack = .;
	} > RAM
}