summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/mpio/boot.lds.flash
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/coldfire/mpio/boot.lds.flash')
-rw-r--r--firmware/target/coldfire/mpio/boot.lds.flash81
1 files changed, 81 insertions, 0 deletions
diff --git a/firmware/target/coldfire/mpio/boot.lds.flash b/firmware/target/coldfire/mpio/boot.lds.flash
new file mode 100644
index 0000000000..2b086586ad
--- /dev/null
+++ b/firmware/target/coldfire/mpio/boot.lds.flash
@@ -0,0 +1,81 @@
1#include "config.h"
2
3ENTRY(start)
4OUTPUT_FORMAT(elf32-m68k)
5STARTUP(target/coldfire/crt0.o)
6
7#define DRAMSIZE (MEMORYSIZE * 0x100000)
8
9#define DRAMORIG 0x31000000
10#define IRAMORIG 0x10000000
11#define IRAMSIZE 0x18000
12#define FLASHORIG 0x000e0000
13#define FLASHSIZE 0x1f800
14
15MEMORY
16{
17 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
18 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
19 FLASH : ORIGIN = FLASHORIG, LENGTH = FLASHSIZE
20}
21
22SECTIONS
23{
24 .vectors :
25 {
26 _datacopy = .;
27 } > FLASH
28
29 .data : AT ( _datacopy )
30 {
31 _datastart = .;
32 KEEP(*(.resetvectors));
33 *(.resetvectors);
34 KEEP(*(.vectors));
35 *(.vectors);
36 . = ALIGN(0x200);
37 *(.icode)
38 *(.irodata)
39 *(.idata)
40 *(.data*)
41 . = ALIGN(0x4);
42 _dataend = .;
43 . = ALIGN(0x10); /* Maintain proper alignment for .text section */
44 } > IRAM
45
46 /* TRICK ALERT! Newer versions of the linker don't allow output sections
47 to overlap even if one of them is empty, so advance the location pointer
48 "by hand" */
49 .text LOADADDR(.data) + SIZEOF(.data) :
50 {
51 *(.init.text)
52 *(.text*)
53 . = ALIGN(0x4);
54 } > FLASH
55
56 .rodata :
57 {
58 *(.rodata*)
59 . = ALIGN(0x4);
60 _iramcopy = .;
61 } > FLASH
62
63 .stack :
64 {
65 *(.stack)
66 _stackbegin = .;
67 stackbegin = .;
68 . += 0x2000;
69 _stackend = .;
70 stackend = .;
71 } > IRAM
72
73 .bss DRAMORIG+0x800000:
74 {
75 _edata = .;
76 *(.ibss)
77 *(.bss*)
78 *(COMMON)
79 _end = .;
80 } > DRAM
81}