mbed(SerialHalfDuplex入り)

Fork of mbed by mbed official

Committer:
yusuke_kyo
Date:
Wed Apr 08 08:04:18 2015 +0000
Revision:
98:01a414ca7d6d
Parent:
85:024bf7f99721
remove SerialHalfDuplex.h

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 85:024bf7f99721 1 /*
bogdanm 85:024bf7f99721 2 * K64F ARM GCC linker script file
bogdanm 85:024bf7f99721 3 */
bogdanm 85:024bf7f99721 4
bogdanm 85:024bf7f99721 5 MEMORY
bogdanm 85:024bf7f99721 6 {
bogdanm 85:024bf7f99721 7 VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400
bogdanm 85:024bf7f99721 8 FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010
bogdanm 85:024bf7f99721 9 FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 0x00100000 - 0x00000410
bogdanm 85:024bf7f99721 10 RAM (rwx) : ORIGIN = 0x1FFF0198, LENGTH = 0x00040000 - 0x00000198
bogdanm 85:024bf7f99721 11 }
bogdanm 85:024bf7f99721 12
bogdanm 85:024bf7f99721 13 /* Linker script to place sections and symbol values. Should be used together
bogdanm 85:024bf7f99721 14 * with other linker script that defines memory regions FLASH and RAM.
bogdanm 85:024bf7f99721 15 * It references following symbols, which must be defined in code:
bogdanm 85:024bf7f99721 16 * _reset_init : Entry of reset handler
bogdanm 85:024bf7f99721 17 *
bogdanm 85:024bf7f99721 18 * It defines following symbols, which code can use without definition:
bogdanm 85:024bf7f99721 19 * __exidx_start
bogdanm 85:024bf7f99721 20 * __exidx_end
bogdanm 85:024bf7f99721 21 * __etext
bogdanm 85:024bf7f99721 22 * __data_start__
bogdanm 85:024bf7f99721 23 * __preinit_array_start
bogdanm 85:024bf7f99721 24 * __preinit_array_end
bogdanm 85:024bf7f99721 25 * __init_array_start
bogdanm 85:024bf7f99721 26 * __init_array_end
bogdanm 85:024bf7f99721 27 * __fini_array_start
bogdanm 85:024bf7f99721 28 * __fini_array_end
bogdanm 85:024bf7f99721 29 * __data_end__
bogdanm 85:024bf7f99721 30 * __bss_start__
bogdanm 85:024bf7f99721 31 * __bss_end__
bogdanm 85:024bf7f99721 32 * __end__
bogdanm 85:024bf7f99721 33 * end
bogdanm 85:024bf7f99721 34 * __HeapLimit
bogdanm 85:024bf7f99721 35 * __StackLimit
bogdanm 85:024bf7f99721 36 * __StackTop
bogdanm 85:024bf7f99721 37 * __stack
bogdanm 85:024bf7f99721 38 */
bogdanm 85:024bf7f99721 39 ENTRY(Reset_Handler)
bogdanm 85:024bf7f99721 40
bogdanm 85:024bf7f99721 41 SECTIONS
bogdanm 85:024bf7f99721 42 {
bogdanm 85:024bf7f99721 43 .isr_vector :
bogdanm 85:024bf7f99721 44 {
bogdanm 85:024bf7f99721 45 __vector_table = .;
bogdanm 85:024bf7f99721 46 KEEP(*(.vector_table))
bogdanm 85:024bf7f99721 47 *(.text.Reset_Handler)
bogdanm 85:024bf7f99721 48 *(.text.System_Init)
bogdanm 85:024bf7f99721 49 . = ALIGN(4);
bogdanm 85:024bf7f99721 50 } > VECTORS
bogdanm 85:024bf7f99721 51
bogdanm 85:024bf7f99721 52 .flash_protect :
bogdanm 85:024bf7f99721 53 {
bogdanm 85:024bf7f99721 54 KEEP(*(.kinetis_flash_config_field))
bogdanm 85:024bf7f99721 55 . = ALIGN(4);
bogdanm 85:024bf7f99721 56 } > FLASH_PROTECTION
bogdanm 85:024bf7f99721 57
bogdanm 85:024bf7f99721 58 .text :
bogdanm 85:024bf7f99721 59 {
bogdanm 85:024bf7f99721 60 *(.text*)
bogdanm 85:024bf7f99721 61
bogdanm 85:024bf7f99721 62 KEEP(*(.init))
bogdanm 85:024bf7f99721 63 KEEP(*(.fini))
bogdanm 85:024bf7f99721 64
bogdanm 85:024bf7f99721 65 /* .ctors */
bogdanm 85:024bf7f99721 66 *crtbegin.o(.ctors)
bogdanm 85:024bf7f99721 67 *crtbegin?.o(.ctors)
bogdanm 85:024bf7f99721 68 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
bogdanm 85:024bf7f99721 69 *(SORT(.ctors.*))
bogdanm 85:024bf7f99721 70 *(.ctors)
bogdanm 85:024bf7f99721 71
bogdanm 85:024bf7f99721 72 /* .dtors */
bogdanm 85:024bf7f99721 73 *crtbegin.o(.dtors)
bogdanm 85:024bf7f99721 74 *crtbegin?.o(.dtors)
bogdanm 85:024bf7f99721 75 *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
bogdanm 85:024bf7f99721 76 *(SORT(.dtors.*))
bogdanm 85:024bf7f99721 77 *(.dtors)
bogdanm 85:024bf7f99721 78
bogdanm 85:024bf7f99721 79 *(.rodata*)
bogdanm 85:024bf7f99721 80
bogdanm 85:024bf7f99721 81 KEEP(*(.eh_frame*))
bogdanm 85:024bf7f99721 82 } > FLASH
bogdanm 85:024bf7f99721 83
bogdanm 85:024bf7f99721 84 .ARM.extab :
bogdanm 85:024bf7f99721 85 {
bogdanm 85:024bf7f99721 86 *(.ARM.extab* .gnu.linkonce.armextab.*)
bogdanm 85:024bf7f99721 87 } > FLASH
bogdanm 85:024bf7f99721 88
bogdanm 85:024bf7f99721 89 __exidx_start = .;
bogdanm 85:024bf7f99721 90 .ARM.exidx :
bogdanm 85:024bf7f99721 91 {
bogdanm 85:024bf7f99721 92 *(.ARM.exidx* .gnu.linkonce.armexidx.*)
bogdanm 85:024bf7f99721 93 } > FLASH
bogdanm 85:024bf7f99721 94 __exidx_end = .;
bogdanm 85:024bf7f99721 95
bogdanm 85:024bf7f99721 96 __etext = .;
bogdanm 85:024bf7f99721 97
bogdanm 85:024bf7f99721 98 .data : AT (__etext)
bogdanm 85:024bf7f99721 99 {
bogdanm 85:024bf7f99721 100 __data_start__ = .;
bogdanm 85:024bf7f99721 101 *(vtable)
bogdanm 85:024bf7f99721 102 *(.data*)
bogdanm 85:024bf7f99721 103
bogdanm 85:024bf7f99721 104 . = ALIGN(4);
bogdanm 85:024bf7f99721 105 /* preinit data */
bogdanm 85:024bf7f99721 106 PROVIDE_HIDDEN (__preinit_array_start = .);
bogdanm 85:024bf7f99721 107 KEEP(*(.preinit_array))
bogdanm 85:024bf7f99721 108 PROVIDE_HIDDEN (__preinit_array_end = .);
bogdanm 85:024bf7f99721 109
bogdanm 85:024bf7f99721 110 . = ALIGN(4);
bogdanm 85:024bf7f99721 111 /* init data */
bogdanm 85:024bf7f99721 112 PROVIDE_HIDDEN (__init_array_start = .);
bogdanm 85:024bf7f99721 113 KEEP(*(SORT(.init_array.*)))
bogdanm 85:024bf7f99721 114 KEEP(*(.init_array))
bogdanm 85:024bf7f99721 115 PROVIDE_HIDDEN (__init_array_end = .);
bogdanm 85:024bf7f99721 116
bogdanm 85:024bf7f99721 117
bogdanm 85:024bf7f99721 118 . = ALIGN(4);
bogdanm 85:024bf7f99721 119 /* finit data */
bogdanm 85:024bf7f99721 120 PROVIDE_HIDDEN (__fini_array_start = .);
bogdanm 85:024bf7f99721 121 KEEP(*(SORT(.fini_array.*)))
bogdanm 85:024bf7f99721 122 KEEP(*(.fini_array))
bogdanm 85:024bf7f99721 123 PROVIDE_HIDDEN (__fini_array_end = .);
bogdanm 85:024bf7f99721 124
bogdanm 85:024bf7f99721 125 . = ALIGN(4);
bogdanm 85:024bf7f99721 126 /* All data end */
bogdanm 85:024bf7f99721 127 __data_end__ = .;
bogdanm 85:024bf7f99721 128
bogdanm 85:024bf7f99721 129 } > RAM
bogdanm 85:024bf7f99721 130
bogdanm 85:024bf7f99721 131 .bss :
bogdanm 85:024bf7f99721 132 {
bogdanm 85:024bf7f99721 133 __bss_start__ = .;
bogdanm 85:024bf7f99721 134 *(.bss*)
bogdanm 85:024bf7f99721 135 *(COMMON)
bogdanm 85:024bf7f99721 136 __bss_end__ = .;
bogdanm 85:024bf7f99721 137 } > RAM
bogdanm 85:024bf7f99721 138
bogdanm 85:024bf7f99721 139 .heap :
bogdanm 85:024bf7f99721 140 {
bogdanm 85:024bf7f99721 141 __end__ = .;
bogdanm 85:024bf7f99721 142 end = __end__;
bogdanm 85:024bf7f99721 143 *(.heap*)
bogdanm 85:024bf7f99721 144 __HeapLimit = .;
bogdanm 85:024bf7f99721 145 } > RAM
bogdanm 85:024bf7f99721 146
bogdanm 85:024bf7f99721 147 /* .stack_dummy section doesn't contains any symbols. It is only
bogdanm 85:024bf7f99721 148 * used for linker to calculate size of stack sections, and assign
bogdanm 85:024bf7f99721 149 * values to stack symbols later */
bogdanm 85:024bf7f99721 150 .stack_dummy :
bogdanm 85:024bf7f99721 151 {
bogdanm 85:024bf7f99721 152 *(.stack)
bogdanm 85:024bf7f99721 153 } > RAM
bogdanm 85:024bf7f99721 154
bogdanm 85:024bf7f99721 155 /* Set stack top to end of RAM, and stack limit move down by
bogdanm 85:024bf7f99721 156 * size of stack_dummy section */
bogdanm 85:024bf7f99721 157 __StackTop = ORIGIN(RAM) + LENGTH(RAM);
bogdanm 85:024bf7f99721 158 __StackLimit = __StackTop - SIZEOF(.stack_dummy);
bogdanm 85:024bf7f99721 159 PROVIDE(__stack = __StackTop);
bogdanm 85:024bf7f99721 160
bogdanm 85:024bf7f99721 161 /* Check if data + heap + stack exceeds RAM limit */
bogdanm 85:024bf7f99721 162 ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack")
bogdanm 85:024bf7f99721 163 }
bogdanm 85:024bf7f99721 164