added prescaler for 16 bit pwm in LPC1347 target
Fork of mbed-dev by
targets/cmsis/TARGET_NXP/TARGET_LPC23XX/TOOLCHAIN_GCC_ARM/LPC2368.ld@0:9b334a45a8ff, 2015-10-01 (annotated)
- Committer:
- bogdanm
- Date:
- Thu Oct 01 15:25:22 2015 +0300
- Revision:
- 0:9b334a45a8ff
- Child:
- 144:ef7eb2e8f9f7
Initial commit on mbed-dev
Replaces mbed-src (now inactive)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 0:9b334a45a8ff | 1 | OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") |
bogdanm | 0:9b334a45a8ff | 2 | OUTPUT_ARCH(arm) |
bogdanm | 0:9b334a45a8ff | 3 | ENTRY(vectors) |
bogdanm | 0:9b334a45a8ff | 4 | |
bogdanm | 0:9b334a45a8ff | 5 | /* Memory Definitions: */ |
bogdanm | 0:9b334a45a8ff | 6 | MEMORY |
bogdanm | 0:9b334a45a8ff | 7 | { |
bogdanm | 0:9b334a45a8ff | 8 | Flash (rx) : ORIGIN = 0x00000000, LENGTH = 512k |
bogdanm | 0:9b334a45a8ff | 9 | Ram (rwx) : ORIGIN = 0x40000000, LENGTH = 32k |
bogdanm | 0:9b334a45a8ff | 10 | UsbRam (rw) : ORIGIN = 0x7FD00000, LENGTH = 8k |
bogdanm | 0:9b334a45a8ff | 11 | EthRam (rw) : ORIGIN = 0x7FE00000, LENGTH = 16k |
bogdanm | 0:9b334a45a8ff | 12 | CanRam (rw) : ORIGIN = 0xE0038000, LENGTH = 2k |
bogdanm | 0:9b334a45a8ff | 13 | BatRam (rw) : ORIGIN = 0xE0084000, LENGTH = 2k |
bogdanm | 0:9b334a45a8ff | 14 | } |
bogdanm | 0:9b334a45a8ff | 15 | |
bogdanm | 0:9b334a45a8ff | 16 | /* Stack sizes: */ |
bogdanm | 0:9b334a45a8ff | 17 | UND_Stack_Size = 16; |
bogdanm | 0:9b334a45a8ff | 18 | SVC_Stack_Size = 512; |
bogdanm | 0:9b334a45a8ff | 19 | ABT_Stack_Size = 16; |
bogdanm | 0:9b334a45a8ff | 20 | FIQ_Stack_Size = 16; |
bogdanm | 0:9b334a45a8ff | 21 | IRQ_Stack_Size = 256; |
bogdanm | 0:9b334a45a8ff | 22 | Stack_Size_Total = UND_Stack_Size + SVC_Stack_Size + ABT_Stack_Size + FIQ_Stack_Size + IRQ_Stack_Size; |
bogdanm | 0:9b334a45a8ff | 23 | |
bogdanm | 0:9b334a45a8ff | 24 | /* Stack tops for each mode: */ |
bogdanm | 0:9b334a45a8ff | 25 | __und_stack_top__ = __stacks_top__; |
bogdanm | 0:9b334a45a8ff | 26 | __abt_stack_top__ = __und_stack_top__ - UND_Stack_Size ; |
bogdanm | 0:9b334a45a8ff | 27 | __fiq_stack_top__ = __abt_stack_top__ - ABT_Stack_Size ; |
bogdanm | 0:9b334a45a8ff | 28 | __irq_stack_top__ = __fiq_stack_top__ - FIQ_Stack_Size ; |
bogdanm | 0:9b334a45a8ff | 29 | __svc_stack_top__ = __irq_stack_top__ - IRQ_Stack_Size ; |
bogdanm | 0:9b334a45a8ff | 30 | |
bogdanm | 0:9b334a45a8ff | 31 | /* C-accessible symbols for memory address ranges: */ |
bogdanm | 0:9b334a45a8ff | 32 | __FLASH_segment_start__ = ORIGIN( Flash ); |
bogdanm | 0:9b334a45a8ff | 33 | __FLASH_segment_end__ = ORIGIN( Flash ) + LENGTH( Flash ); |
bogdanm | 0:9b334a45a8ff | 34 | __SRAM_segment_start__ = ORIGIN( Ram ); |
bogdanm | 0:9b334a45a8ff | 35 | __SRAM_segment_end__ = ORIGIN( Ram ) + LENGTH( Ram ); |
bogdanm | 0:9b334a45a8ff | 36 | |
bogdanm | 0:9b334a45a8ff | 37 | /* Stacks (full descending) at top of RAM, grows downward: |
bogdanm | 0:9b334a45a8ff | 38 | * |
bogdanm | 0:9b334a45a8ff | 39 | * __stack_min__ is used by the malloc implementation to ensure heap never collides |
bogdanm | 0:9b334a45a8ff | 40 | * with stack (assuming stack never grows beyond Stack_Size_Total in length) */ |
bogdanm | 0:9b334a45a8ff | 41 | __stacks_top__ = __SRAM_segment_end__; |
bogdanm | 0:9b334a45a8ff | 42 | __stacks_min__ = __SRAM_segment_end__ - Stack_Size_Total; |
bogdanm | 0:9b334a45a8ff | 43 | |
bogdanm | 0:9b334a45a8ff | 44 | SECTIONS |
bogdanm | 0:9b334a45a8ff | 45 | { |
bogdanm | 0:9b334a45a8ff | 46 | /* first section is .text which is used for code */ |
bogdanm | 0:9b334a45a8ff | 47 | __text_start__ = . ; |
bogdanm | 0:9b334a45a8ff | 48 | .text : { |
bogdanm | 0:9b334a45a8ff | 49 | __privileged_code_start__ = . ; |
bogdanm | 0:9b334a45a8ff | 50 | KEEP( *( .vectors ) ) |
bogdanm | 0:9b334a45a8ff | 51 | *( .privileged_code ) |
bogdanm | 0:9b334a45a8ff | 52 | |
bogdanm | 0:9b334a45a8ff | 53 | __privileged_code_end__ = .; |
bogdanm | 0:9b334a45a8ff | 54 | |
bogdanm | 0:9b334a45a8ff | 55 | *( .text .text.* .gnu.linkonce.t.* ) |
bogdanm | 0:9b334a45a8ff | 56 | *( .plt ) |
bogdanm | 0:9b334a45a8ff | 57 | *( .gnu.warning ) |
bogdanm | 0:9b334a45a8ff | 58 | *( .glue_7t ) *( .glue_7 ) *( .vfp11_veneer ) |
bogdanm | 0:9b334a45a8ff | 59 | |
bogdanm | 0:9b334a45a8ff | 60 | *( .rodata .rodata.* .gnu.linkonce.r.* ) |
bogdanm | 0:9b334a45a8ff | 61 | |
bogdanm | 0:9b334a45a8ff | 62 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
bogdanm | 0:9b334a45a8ff | 63 | *(.gcc_except_table) |
bogdanm | 0:9b334a45a8ff | 64 | *(.eh_frame_hdr) |
bogdanm | 0:9b334a45a8ff | 65 | *(.eh_frame) |
bogdanm | 0:9b334a45a8ff | 66 | |
bogdanm | 0:9b334a45a8ff | 67 | . = ALIGN( 4 ) ; |
bogdanm | 0:9b334a45a8ff | 68 | KEEP( *( .init ) ) |
bogdanm | 0:9b334a45a8ff | 69 | . = ALIGN( 4 ) ; |
bogdanm | 0:9b334a45a8ff | 70 | __preinit_array_start = . ; |
bogdanm | 0:9b334a45a8ff | 71 | KEEP( *( .preinit_array ) ) |
bogdanm | 0:9b334a45a8ff | 72 | __preinit_array_end = . ; |
bogdanm | 0:9b334a45a8ff | 73 | . = ALIGN( 4 ) ; |
bogdanm | 0:9b334a45a8ff | 74 | __init_array_start = . ; |
bogdanm | 0:9b334a45a8ff | 75 | KEEP( *( SORT( .init_array.* ) ) ) |
bogdanm | 0:9b334a45a8ff | 76 | KEEP( *( .init_array ) ) |
bogdanm | 0:9b334a45a8ff | 77 | __init_array_end = . ; |
bogdanm | 0:9b334a45a8ff | 78 | |
bogdanm | 0:9b334a45a8ff | 79 | . = ALIGN( 4 ) ; |
bogdanm | 0:9b334a45a8ff | 80 | KEEP( *crtbegin.o( .ctors ) ) |
bogdanm | 0:9b334a45a8ff | 81 | KEEP( *( EXCLUDE_FILE( *crtend.o ) .ctors ) ) |
bogdanm | 0:9b334a45a8ff | 82 | KEEP( *( SORT( .ctors.* ) ) ) |
bogdanm | 0:9b334a45a8ff | 83 | KEEP( *crtend.o( .ctors ) ) |
bogdanm | 0:9b334a45a8ff | 84 | |
bogdanm | 0:9b334a45a8ff | 85 | . = ALIGN( 4 ) ; |
bogdanm | 0:9b334a45a8ff | 86 | KEEP( *( .fini ) ) |
bogdanm | 0:9b334a45a8ff | 87 | . = ALIGN( 4 ) ; |
bogdanm | 0:9b334a45a8ff | 88 | __fini_array_start = . ; |
bogdanm | 0:9b334a45a8ff | 89 | KEEP( *( .fini_array ) ) |
bogdanm | 0:9b334a45a8ff | 90 | KEEP( *( SORT( .fini_array.* ) ) ) |
bogdanm | 0:9b334a45a8ff | 91 | __fini_array_end = . ; |
bogdanm | 0:9b334a45a8ff | 92 | |
bogdanm | 0:9b334a45a8ff | 93 | KEEP( *crtbegin.o( .dtors ) ) |
bogdanm | 0:9b334a45a8ff | 94 | KEEP( *( EXCLUDE_FILE( *crtend.o ) .dtors ) ) |
bogdanm | 0:9b334a45a8ff | 95 | KEEP( *( SORT( .dtors.* ) ) ) |
bogdanm | 0:9b334a45a8ff | 96 | KEEP( *crtend.o( .dtors ) ) |
bogdanm | 0:9b334a45a8ff | 97 | |
bogdanm | 0:9b334a45a8ff | 98 | } >Flash |
bogdanm | 0:9b334a45a8ff | 99 | |
bogdanm | 0:9b334a45a8ff | 100 | __exidx_start = . ; |
bogdanm | 0:9b334a45a8ff | 101 | .ARM.exidx : { |
bogdanm | 0:9b334a45a8ff | 102 | *( .ARM.exidx* .gnu.linkonce.armexidx.* ) |
bogdanm | 0:9b334a45a8ff | 103 | } >Flash |
bogdanm | 0:9b334a45a8ff | 104 | __exidx_end = . ; |
bogdanm | 0:9b334a45a8ff | 105 | |
bogdanm | 0:9b334a45a8ff | 106 | .text.align : { . = ALIGN( 8 ) ; } >Flash /* Alignment schenanigans */ |
bogdanm | 0:9b334a45a8ff | 107 | __text_end__ = . ; |
bogdanm | 0:9b334a45a8ff | 108 | |
bogdanm | 0:9b334a45a8ff | 109 | /* .bss section -- used for uninitialized data */ |
bogdanm | 0:9b334a45a8ff | 110 | /* Located at the start of RAM */ |
bogdanm | 0:9b334a45a8ff | 111 | .bss (NOLOAD) : { |
bogdanm | 0:9b334a45a8ff | 112 | __bss_start__ = . ; |
bogdanm | 0:9b334a45a8ff | 113 | *crt0.o( .ram_vectors ) |
bogdanm | 0:9b334a45a8ff | 114 | |
bogdanm | 0:9b334a45a8ff | 115 | __user_bss_start__ = . ; |
bogdanm | 0:9b334a45a8ff | 116 | *( .user_bss ) |
bogdanm | 0:9b334a45a8ff | 117 | __user_bss_end__ = . ; |
bogdanm | 0:9b334a45a8ff | 118 | |
bogdanm | 0:9b334a45a8ff | 119 | *( .shbss ) |
bogdanm | 0:9b334a45a8ff | 120 | *( .bss .bss.* .gnu.linkonce.b.* ) |
bogdanm | 0:9b334a45a8ff | 121 | *( COMMON ) |
bogdanm | 0:9b334a45a8ff | 122 | *( .ram.b ) |
bogdanm | 0:9b334a45a8ff | 123 | . = ALIGN( 8 ) ; |
bogdanm | 0:9b334a45a8ff | 124 | |
bogdanm | 0:9b334a45a8ff | 125 | __bss_end__ = . ; |
bogdanm | 0:9b334a45a8ff | 126 | } >Ram AT>Flash |
bogdanm | 0:9b334a45a8ff | 127 | |
bogdanm | 0:9b334a45a8ff | 128 | /* .data section -- used for initialized data */ |
bogdanm | 0:9b334a45a8ff | 129 | .data : { |
bogdanm | 0:9b334a45a8ff | 130 | __data_start__ = . ; |
bogdanm | 0:9b334a45a8ff | 131 | KEEP( *( .jcr ) ) |
bogdanm | 0:9b334a45a8ff | 132 | *( .got.plt ) *( .got ) |
bogdanm | 0:9b334a45a8ff | 133 | *( .shdata ) |
bogdanm | 0:9b334a45a8ff | 134 | *( .data .data.* .gnu.linkonce.d.* ) |
bogdanm | 0:9b334a45a8ff | 135 | *( .ram ) |
bogdanm | 0:9b334a45a8ff | 136 | . = ALIGN( 8 ) ; |
bogdanm | 0:9b334a45a8ff | 137 | __data_end__ = . ; |
bogdanm | 0:9b334a45a8ff | 138 | } >Ram AT>Flash |
bogdanm | 0:9b334a45a8ff | 139 | |
bogdanm | 0:9b334a45a8ff | 140 | __data_init_start__ = LOADADDR( .data ) ; |
bogdanm | 0:9b334a45a8ff | 141 | |
bogdanm | 0:9b334a45a8ff | 142 | /* Heap starts here and grows up in memory */ |
bogdanm | 0:9b334a45a8ff | 143 | . = ALIGN( 8 ) ; |
bogdanm | 0:9b334a45a8ff | 144 | __heap_start__ = . ; |
bogdanm | 0:9b334a45a8ff | 145 | end = . ; |
bogdanm | 0:9b334a45a8ff | 146 | __end__ = . ; |
bogdanm | 0:9b334a45a8ff | 147 | |
bogdanm | 0:9b334a45a8ff | 148 | .stab 0 (NOLOAD) : { *(.stab) } |
bogdanm | 0:9b334a45a8ff | 149 | .stabstr 0 (NOLOAD) : { *(.stabstr) } |
bogdanm | 0:9b334a45a8ff | 150 | /* DWARF debug sections. */ |
bogdanm | 0:9b334a45a8ff | 151 | /* Symbols in the DWARF debugging sections are relative to the */ |
bogdanm | 0:9b334a45a8ff | 152 | /* beginning of the section so we begin them at 0. */ |
bogdanm | 0:9b334a45a8ff | 153 | /* DWARF 1 */ |
bogdanm | 0:9b334a45a8ff | 154 | .debug 0 : { *(.debug) } |
bogdanm | 0:9b334a45a8ff | 155 | .line 0 : { *(.line) } |
bogdanm | 0:9b334a45a8ff | 156 | /* GNU DWARF 1 extensions */ |
bogdanm | 0:9b334a45a8ff | 157 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
bogdanm | 0:9b334a45a8ff | 158 | .debug_sfnames 0 : { *(.debug_sfnames) } |
bogdanm | 0:9b334a45a8ff | 159 | /* DWARF 1.1 and DWARF 2 */ |
bogdanm | 0:9b334a45a8ff | 160 | .debug_aranges 0 : { *(.debug_aranges) } |
bogdanm | 0:9b334a45a8ff | 161 | .debug_pubnames 0 : { *(.debug_pubnames) } |
bogdanm | 0:9b334a45a8ff | 162 | /* DWARF 2 */ |
bogdanm | 0:9b334a45a8ff | 163 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) } |
bogdanm | 0:9b334a45a8ff | 164 | .debug_abbrev 0 : { *(.debug_abbrev) } |
bogdanm | 0:9b334a45a8ff | 165 | .debug_line 0 : { *(.debug_line) } |
bogdanm | 0:9b334a45a8ff | 166 | .debug_frame 0 : { *(.debug_frame) } |
bogdanm | 0:9b334a45a8ff | 167 | .debug_str 0 : { *(.debug_str) } |
bogdanm | 0:9b334a45a8ff | 168 | .debug_loc 0 : { *(.debug_loc) } |
bogdanm | 0:9b334a45a8ff | 169 | .debug_macinfo 0 : { *(.debug_macinfo) } |
bogdanm | 0:9b334a45a8ff | 170 | /* SGI/MIPS DWARF 2 extensions */ |
bogdanm | 0:9b334a45a8ff | 171 | .debug_weaknames 0 : { *(.debug_weaknames) } |
bogdanm | 0:9b334a45a8ff | 172 | .debug_funcnames 0 : { *(.debug_funcnames) } |
bogdanm | 0:9b334a45a8ff | 173 | .debug_typenames 0 : { *(.debug_typenames) } |
bogdanm | 0:9b334a45a8ff | 174 | .debug_varnames 0 : { *(.debug_varnames) } |
bogdanm | 0:9b334a45a8ff | 175 | /* DWARF 3 */ |
bogdanm | 0:9b334a45a8ff | 176 | .debug_pubtypes 0 : { *(.debug_pubtypes) } |
bogdanm | 0:9b334a45a8ff | 177 | .debug_ranges 0 : { *(.debug_ranges) } |
bogdanm | 0:9b334a45a8ff | 178 | |
bogdanm | 0:9b334a45a8ff | 179 | .note.gnu.arm.ident 0 : { KEEP( *( .note.gnu.arm.ident ) ) } |
bogdanm | 0:9b334a45a8ff | 180 | .ARM.attributes 0 : { |
bogdanm | 0:9b334a45a8ff | 181 | KEEP( *( .ARM.attributes ) ) |
bogdanm | 0:9b334a45a8ff | 182 | KEEP( *( .gnu.attributes ) ) |
bogdanm | 0:9b334a45a8ff | 183 | } |
bogdanm | 0:9b334a45a8ff | 184 | /DISCARD/ : { *( .note.GNU-stack ) } |
bogdanm | 0:9b334a45a8ff | 185 | |
bogdanm | 0:9b334a45a8ff | 186 | /* C data can be defined as being in special purpose RAMs using |
bogdanm | 0:9b334a45a8ff | 187 | * __attribute__ ((section ("ethram"))) for example. */ |
bogdanm | 0:9b334a45a8ff | 188 | .usbram (NOLOAD): |
bogdanm | 0:9b334a45a8ff | 189 | { |
bogdanm | 0:9b334a45a8ff | 190 | *( .usbram ) |
bogdanm | 0:9b334a45a8ff | 191 | *( .usbram.* ) |
bogdanm | 0:9b334a45a8ff | 192 | } > UsbRam |
bogdanm | 0:9b334a45a8ff | 193 | .ethram (NOLOAD): |
bogdanm | 0:9b334a45a8ff | 194 | { |
bogdanm | 0:9b334a45a8ff | 195 | *( .ethram ) |
bogdanm | 0:9b334a45a8ff | 196 | *( .ethram.* ) |
bogdanm | 0:9b334a45a8ff | 197 | } > EthRam |
bogdanm | 0:9b334a45a8ff | 198 | .canram (NOLOAD): |
bogdanm | 0:9b334a45a8ff | 199 | { |
bogdanm | 0:9b334a45a8ff | 200 | *( .canram ) |
bogdanm | 0:9b334a45a8ff | 201 | *( .canram.* ) |
bogdanm | 0:9b334a45a8ff | 202 | } > CanRam |
bogdanm | 0:9b334a45a8ff | 203 | .batram (NOLOAD): |
bogdanm | 0:9b334a45a8ff | 204 | { |
bogdanm | 0:9b334a45a8ff | 205 | *( .batram ) |
bogdanm | 0:9b334a45a8ff | 206 | *( .batram.* ) |
bogdanm | 0:9b334a45a8ff | 207 | } > BatRam |
bogdanm | 0:9b334a45a8ff | 208 | } |