summaryrefslogtreecommitdiff
path: root/flash/bootloader/no_rom.lds
diff options
context:
space:
mode:
Diffstat (limited to 'flash/bootloader/no_rom.lds')
-rw-r--r--flash/bootloader/no_rom.lds62
1 files changed, 62 insertions, 0 deletions
diff --git a/flash/bootloader/no_rom.lds b/flash/bootloader/no_rom.lds
new file mode 100644
index 0000000000..e65e7fdd3c
--- /dev/null
+++ b/flash/bootloader/no_rom.lds
@@ -0,0 +1,62 @@
1/* This is for the variant without boot ROM,
2 where the flash ROM is mirrored to address zero */
3
4OUTPUT_FORMAT(elf32-sh)
5INPUT(bootloader.o)
6
7MEMORY
8{
9 IRAM : ORIGIN = 0x0FFFF000, LENGTH = 0x1000
10 FLASH : ORIGIN = 0x00000000, LENGTH = 0x40000
11}
12
13SECTIONS
14{
15 .vectors :
16 {
17 *(.vectors)
18 . = ALIGN(0x200);
19 } > FLASH
20
21 .startup :
22 {
23 *(.startup)
24 . = ALIGN(0x4);
25 _begin_iramcopy = .;
26 } > FLASH
27
28 .text : AT ( _begin_iramcopy )
29 {
30 _begin_text = .;
31 *(.text)
32 . = ALIGN(0x4);
33 _end_text = .;
34 } > IRAM
35
36 .data : AT ( _end_text )
37 {
38 _begin_data = .;
39 *(.data)
40 . = ALIGN(0x4);
41 _end_data = .;
42 } > IRAM
43
44 .bss : AT ( _end_data )
45 {
46 _begin_bss = .;
47 *(.bss)
48 . = ALIGN(0x4);
49 _end_bss = .;
50 } > IRAM
51
52 .stack :
53 {
54 _begin_stack = .;
55 *(.stack)
56 . = ALIGN(0x1000);
57 _end_stack = .;
58 } > IRAM
59
60 /* size of the program (without vectors) */
61 _total_size = SIZEOF(.startup) + SIZEOF(.text) + SIZEOF(.data);
62}