Jörg Hohensohn | 6a4e4c8 | 2003-11-30 11:37:43 +0000 | [diff] [blame] | 1 | /* This is for the variant without boot ROM, |
| 2 | where the flash ROM is mirrored to address zero */ |
| 3 | |
| 4 | OUTPUT_FORMAT(elf32-sh) |
Jörg Hohensohn | 6a4e4c8 | 2003-11-30 11:37:43 +0000 | [diff] [blame] | 5 | |
| 6 | MEMORY |
| 7 | { |
| 8 | IRAM : ORIGIN = 0x0FFFF000, LENGTH = 0x1000 |
| 9 | FLASH : ORIGIN = 0x00000000, LENGTH = 0x40000 |
| 10 | } |
| 11 | |
| 12 | SECTIONS |
| 13 | { |
| 14 | .vectors : |
| 15 | { |
Boris Gjenero | ca9111e | 2011-12-18 06:43:08 +0000 | [diff] [blame] | 16 | KEEP(*(.vectors)) |
Jörg Hohensohn | 6a4e4c8 | 2003-11-30 11:37:43 +0000 | [diff] [blame] | 17 | . = ALIGN(0x200); |
| 18 | } > FLASH |
| 19 | |
| 20 | .startup : |
| 21 | { |
| 22 | *(.startup) |
| 23 | . = ALIGN(0x4); |
| 24 | _begin_iramcopy = .; |
| 25 | } > FLASH |
| 26 | |
| 27 | .text : AT ( _begin_iramcopy ) |
| 28 | { |
| 29 | _begin_text = .; |
| 30 | *(.text) |
Jens Arnold | e13e318 | 2008-10-30 00:17:45 +0000 | [diff] [blame] | 31 | *(.icode) |
Jörg Hohensohn | 6a4e4c8 | 2003-11-30 11:37:43 +0000 | [diff] [blame] | 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 | } |