summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc780x/boot.lds
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/tcc780x/boot.lds')
-rw-r--r--firmware/target/arm/tcc780x/boot.lds62
1 files changed, 62 insertions, 0 deletions
diff --git a/firmware/target/arm/tcc780x/boot.lds b/firmware/target/arm/tcc780x/boot.lds
new file mode 100644
index 0000000000..657f31901a
--- /dev/null
+++ b/firmware/target/arm/tcc780x/boot.lds
@@ -0,0 +1,62 @@
1#include "config.h"
2
3ENTRY(start)
4OUTPUT_FORMAT(elf32-littlearm)
5OUTPUT_ARCH(arm)
6INPUT(target/arm/tcc780x/crt0.o)
7
8#define DRAMSIZE (MEMORYSIZE * 0x100000)
9
10#define DRAMORIG 0x20000000
11#define IRAMORIG 0x00000000
12#define IRAMSIZE 4K
13#define FLASHORIG 0x0000000
14#define FLASHSIZE 1M
15
16MEMORY
17{
18#ifdef TCCBOOT
19 DRAM : ORIGIN = DRAMORIG + DRAMSIZE - 0x100000, LENGTH = 0x100000
20#else
21 DRAM : ORIGIN = DRAMORIG, LENGTH = DRAMSIZE
22#endif
23 IRAM : ORIGIN = IRAMORIG, LENGTH = IRAMSIZE
24}
25
26SECTIONS
27{
28 .text : {
29 *(.init.text)
30 *(.text)
31 *(.text*)
32 *(.glue_7)
33 *(.glue_7t)
34 } > DRAM
35
36 .data : {
37 *(.icode)
38 *(.irodata)
39 *(.idata)
40 *(.data*)
41 *(.rodata.*)
42 . = ALIGN(0x4);
43 _dataend = . ;
44 } > DRAM
45
46 .stack :
47 {
48 *(.stack)
49 _stackbegin = .;
50 stackbegin = .;
51 . += 0x2000;
52 _stackend = .;
53 stackend = .;
54 } > DRAM
55 .bss : {
56 _edata = .;
57 *(.bss*);
58 *(.ibss);
59 *(COMMON)
60 _end = .;
61 } > DRAM
62}