aboutsummaryrefslogtreecommitdiff
path: root/example-fs-bb48/sample.ld
diff options
context:
space:
mode:
Diffstat (limited to 'example-fs-bb48/sample.ld')
-rw-r--r--example-fs-bb48/sample.ld135
1 files changed, 135 insertions, 0 deletions
diff --git a/example-fs-bb48/sample.ld b/example-fs-bb48/sample.ld
new file mode 100644
index 0000000..787bda9
--- /dev/null
+++ b/example-fs-bb48/sample.ld
@@ -0,0 +1,135 @@
+/*
+ * MK27Z memory setup.
+ */
+__main_stack_size__ = 0x0100; /* Exception handlers */
+__process0_stack_size__ = 0x0300; /* Main program */
+__process1_stack_size__ = 0x0200; /* first thread program */
+__process2_stack_size__ = 0x0100; /* second thread program */
+__process3_stack_size__ = 0x0200; /* third thread program */
+
+MEMORY
+{
+ flash : org = 0x00000000, len = 256k
+ ram : org = 0x1fffe000, len = 32k
+}
+
+__ram_start__ = ORIGIN(ram);
+__ram_size__ = 32k;
+__ram_end__ = __ram_start__ + __ram_size__;
+
+SECTIONS
+{
+ . = 0;
+
+ _text = .;
+
+ .text : ALIGN(16) SUBALIGN(16)
+ {
+ KEEP(*(.vectors))
+ . = ALIGN(1024);
+ KEEP(*(.flash_config))
+ . = ALIGN(16);
+ *(.text.svc)
+ *(.text.sched)
+ *(.text.preempt)
+ *(.text.startup.*)
+ *(.text)
+ *(.text.*)
+ *(.rodata)
+ *(.rodata.*)
+ *(.glue_7t)
+ *(.glue_7)
+ *(.gcc*)
+ . = ALIGN(8);
+ } > flash
+
+ /DISCARD/ :
+ {
+ *(.startup.vectors)
+ *(.bss.startup.0)
+ }
+
+ .ARM.extab : {*(.ARM.extab* .gnu.linkonce.armextab.*)} > flash
+
+ .ARM.exidx : {
+ PROVIDE(__exidx_start = .);
+ *(.ARM.exidx* .gnu.linkonce.armexidx.*)
+ PROVIDE(__exidx_end = .);
+ } > flash
+
+ .eh_frame_hdr : {*(.eh_frame_hdr)} > flash
+
+ .eh_frame : ONLY_IF_RO {*(.eh_frame)} > flash
+
+ .textalign : ONLY_IF_RO { . = ALIGN(8); } > flash
+
+ _etext = .;
+ _textdata = _etext;
+
+ .process_stack :
+ {
+ . = ALIGN(8);
+ __process3_stack_base__ = .;
+ . += __process3_stack_size__;
+ . = ALIGN(8);
+ __process3_stack_end__ = .;
+ __process2_stack_base__ = .;
+ . += __process2_stack_size__;
+ . = ALIGN(8);
+ __process2_stack_end__ = .;
+ __process1_stack_base__ = .;
+ . += __process1_stack_size__;
+ . = ALIGN(8);
+ __process1_stack_end__ = .;
+ __process0_stack_base__ = .;
+ . += __process0_stack_size__;
+ . = ALIGN(8);
+ __process0_stack_end__ = .;
+ } > ram
+
+ .main_stack :
+ {
+ . = ALIGN(8);
+ __main_stack_base__ = .;
+ . += __main_stack_size__;
+ . = ALIGN(8);
+ __main_stack_end__ = .;
+ } > ram
+
+ .data :
+ {
+ . = ALIGN(512);
+ __usb_bdt__ = .;
+ . += 512;
+ __usb_buf__ = .;
+ . += 8 /*control write*/ + 64 /*control read*/ + 64 + 64 + 8;
+ . = ALIGN(4);
+ PROVIDE(_data = .);
+ *(.data)
+ . = ALIGN(4);
+ *(.data.*)
+ . = ALIGN(4);
+ *(.ramtext)
+ . = ALIGN(4);
+ PROVIDE(_edata = .);
+ } > ram AT > flash
+
+ .bss :
+ {
+ . = ALIGN(4);
+ PROVIDE(_bss_start = .);
+ *(.bss)
+ . = ALIGN(4);
+ *(.bss.*)
+ . = ALIGN(4);
+ *(COMMON)
+ . = ALIGN(4);
+ PROVIDE(_bss_end = .);
+ } > ram
+
+ PROVIDE(end = .);
+ _end = .;
+}
+
+__heap_base__ = _end;
+__heap_end__ = __ram_end__;