Fork of mbed-src file paths change. LPC1114FN28 use only.
Fork of mbed-src by
Information
この情報は2013/10/28時点での解決方法です。
現在はmbed-src、標準ライブラリで問題なくコンパイルが可能です。
・使う物
LPC1114FN28
mbed SDK
LPC1114FN28でmbed-SDKのLibraryを使うとCompile出来ない。(2013/10/28)
パスが通ってないだけのようなのでファイルを以下に移動する。
mbed-src\targets\cmsis\TARGET_NXP\TARGET_LPC11XX_11CXX\ mbed-src\targets\cmsis\TARGET_NXP\TARGET_LPC11XX_11CXX\TARGET_LPC11XX\ |
にあるファイルをすべて
mbed-src\targets\cmsis\TARGET_NXP\ |
へ移動
mbed-src\targets\cmsis\TARGET_NXP\TARGET_LPC11XX_11CXX\にある
TOOLCHAIN_ARM_MICRO |
をフォルダごと
mbed-src\targets\cmsis\TARGET_NXP\ |
へ移動
mbed-src\targets\hal\TARGET_NXP\TARGET_LPC11XX_11CXX\ mbed-src\targets\hal\TARGET_NXP\TARGET_LPC11XX_11CXX\TARGET_LPC11XX\ |
にあるファイルをすべて
mbed-src\targets\hal\TARGET_NXP\ |
へ移動
移動後は以下のような構成になると思います。
※不要なファイルは削除してあります。
![]() |
ファイルの移動が面倒なので以下に本家からフォークしたライブラリを置いておきます。
Import librarymbed-src-LPC1114FN28
Fork of mbed-src file paths change. LPC1114FN28 use only.
エラーが出力される場合
"TOOLCHAIN_ARM_MICRO"が無いとエラーになる。
Error: Undefined symbol _initial_sp (referred from entry2.o). Error: Undefined symbol _heap_base (referred from malloc.o). Error: Undefined symbol _heap_limit (referred from malloc.o). |
LPC1114FN28はMicrolibを使ってCompileされるため上記のエラーになるようです。
targets/cmsis/TARGET_Freescale/TARGET_KL46Z/TOOLCHAIN_GCC_ARM/MKL46Z4.ld@33:e214068ab66c, 2013-10-07 (annotated)
- Committer:
- mbed_official
- Date:
- Mon Oct 07 09:15:08 2013 +0100
- Revision:
- 33:e214068ab66c
- Parent:
- 31:42176bc3c368
Synchronized with git revision 53edc82f7373bbfa01a161700524765f52fdb444
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 31:42176bc3c368 | 1 | /* |
mbed_official | 33:e214068ab66c | 2 | * KL46Z ARM GCC linker script file |
mbed_official | 31:42176bc3c368 | 3 | */ |
mbed_official | 31:42176bc3c368 | 4 | |
mbed_official | 31:42176bc3c368 | 5 | MEMORY |
mbed_official | 31:42176bc3c368 | 6 | { |
mbed_official | 31:42176bc3c368 | 7 | VECTORS (rx) : ORIGIN = 0x00000000, LENGTH = 0x00000400 |
mbed_official | 33:e214068ab66c | 8 | FLASH_PROTECTION (rx) : ORIGIN = 0x00000400, LENGTH = 0x00000010 |
mbed_official | 31:42176bc3c368 | 9 | FLASH (rx) : ORIGIN = 0x00000410, LENGTH = 256K - 0x00000410 |
mbed_official | 33:e214068ab66c | 10 | RAM (rwx) : ORIGIN = 0x1FFFE0C0, LENGTH = 32K - 0xC0 |
mbed_official | 31:42176bc3c368 | 11 | } |
mbed_official | 31:42176bc3c368 | 12 | |
mbed_official | 31:42176bc3c368 | 13 | /* Linker script to place sections and symbol values. Should be used together |
mbed_official | 31:42176bc3c368 | 14 | * with other linker script that defines memory regions FLASH and RAM. |
mbed_official | 31:42176bc3c368 | 15 | * It references following symbols, which must be defined in code: |
mbed_official | 31:42176bc3c368 | 16 | * _reset_init : Entry of reset handler |
mbed_official | 31:42176bc3c368 | 17 | * |
mbed_official | 31:42176bc3c368 | 18 | * It defines following symbols, which code can use without definition: |
mbed_official | 31:42176bc3c368 | 19 | * __exidx_start |
mbed_official | 31:42176bc3c368 | 20 | * __exidx_end |
mbed_official | 31:42176bc3c368 | 21 | * __etext |
mbed_official | 31:42176bc3c368 | 22 | * __data_start__ |
mbed_official | 31:42176bc3c368 | 23 | * __preinit_array_start |
mbed_official | 31:42176bc3c368 | 24 | * __preinit_array_end |
mbed_official | 31:42176bc3c368 | 25 | * __init_array_start |
mbed_official | 31:42176bc3c368 | 26 | * __init_array_end |
mbed_official | 31:42176bc3c368 | 27 | * __fini_array_start |
mbed_official | 31:42176bc3c368 | 28 | * __fini_array_end |
mbed_official | 31:42176bc3c368 | 29 | * __data_end__ |
mbed_official | 31:42176bc3c368 | 30 | * __bss_start__ |
mbed_official | 31:42176bc3c368 | 31 | * __bss_end__ |
mbed_official | 31:42176bc3c368 | 32 | * __end__ |
mbed_official | 31:42176bc3c368 | 33 | * end |
mbed_official | 31:42176bc3c368 | 34 | * __HeapLimit |
mbed_official | 31:42176bc3c368 | 35 | * __StackLimit |
mbed_official | 31:42176bc3c368 | 36 | * __StackTop |
mbed_official | 31:42176bc3c368 | 37 | * __stack |
mbed_official | 31:42176bc3c368 | 38 | */ |
mbed_official | 31:42176bc3c368 | 39 | ENTRY(Reset_Handler) |
mbed_official | 31:42176bc3c368 | 40 | |
mbed_official | 31:42176bc3c368 | 41 | SECTIONS |
mbed_official | 31:42176bc3c368 | 42 | { |
mbed_official | 31:42176bc3c368 | 43 | .isr_vector : |
mbed_official | 31:42176bc3c368 | 44 | { |
mbed_official | 31:42176bc3c368 | 45 | __vector_table = .; |
mbed_official | 31:42176bc3c368 | 46 | KEEP(*(.vector_table)) |
mbed_official | 31:42176bc3c368 | 47 | *(.text.Reset_Handler) |
mbed_official | 31:42176bc3c368 | 48 | *(.text.System_Init) |
mbed_official | 31:42176bc3c368 | 49 | . = ALIGN(4); |
mbed_official | 31:42176bc3c368 | 50 | } > VECTORS |
mbed_official | 31:42176bc3c368 | 51 | |
mbed_official | 31:42176bc3c368 | 52 | .flash_protect : |
mbed_official | 31:42176bc3c368 | 53 | { |
mbed_official | 31:42176bc3c368 | 54 | KEEP(*(.kinetis_flash_config_field)) |
mbed_official | 31:42176bc3c368 | 55 | . = ALIGN(4); |
mbed_official | 31:42176bc3c368 | 56 | } > FLASH_PROTECTION |
mbed_official | 31:42176bc3c368 | 57 | |
mbed_official | 31:42176bc3c368 | 58 | .text : |
mbed_official | 31:42176bc3c368 | 59 | { |
mbed_official | 31:42176bc3c368 | 60 | *(.text*) |
mbed_official | 31:42176bc3c368 | 61 | |
mbed_official | 31:42176bc3c368 | 62 | KEEP(*(.init)) |
mbed_official | 31:42176bc3c368 | 63 | KEEP(*(.fini)) |
mbed_official | 31:42176bc3c368 | 64 | |
mbed_official | 31:42176bc3c368 | 65 | /* .ctors */ |
mbed_official | 31:42176bc3c368 | 66 | *crtbegin.o(.ctors) |
mbed_official | 31:42176bc3c368 | 67 | *crtbegin?.o(.ctors) |
mbed_official | 31:42176bc3c368 | 68 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
mbed_official | 31:42176bc3c368 | 69 | *(SORT(.ctors.*)) |
mbed_official | 31:42176bc3c368 | 70 | *(.ctors) |
mbed_official | 31:42176bc3c368 | 71 | |
mbed_official | 31:42176bc3c368 | 72 | /* .dtors */ |
mbed_official | 31:42176bc3c368 | 73 | *crtbegin.o(.dtors) |
mbed_official | 31:42176bc3c368 | 74 | *crtbegin?.o(.dtors) |
mbed_official | 31:42176bc3c368 | 75 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
mbed_official | 31:42176bc3c368 | 76 | *(SORT(.dtors.*)) |
mbed_official | 31:42176bc3c368 | 77 | *(.dtors) |
mbed_official | 31:42176bc3c368 | 78 | |
mbed_official | 31:42176bc3c368 | 79 | *(.rodata*) |
mbed_official | 31:42176bc3c368 | 80 | |
mbed_official | 31:42176bc3c368 | 81 | KEEP(*(.eh_frame*)) |
mbed_official | 31:42176bc3c368 | 82 | } > FLASH |
mbed_official | 31:42176bc3c368 | 83 | |
mbed_official | 31:42176bc3c368 | 84 | .ARM.extab : |
mbed_official | 31:42176bc3c368 | 85 | { |
mbed_official | 31:42176bc3c368 | 86 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
mbed_official | 31:42176bc3c368 | 87 | } > FLASH |
mbed_official | 31:42176bc3c368 | 88 | |
mbed_official | 31:42176bc3c368 | 89 | __exidx_start = .; |
mbed_official | 31:42176bc3c368 | 90 | .ARM.exidx : |
mbed_official | 31:42176bc3c368 | 91 | { |
mbed_official | 31:42176bc3c368 | 92 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
mbed_official | 31:42176bc3c368 | 93 | } > FLASH |
mbed_official | 31:42176bc3c368 | 94 | __exidx_end = .; |
mbed_official | 31:42176bc3c368 | 95 | |
mbed_official | 31:42176bc3c368 | 96 | __etext = .; |
mbed_official | 31:42176bc3c368 | 97 | |
mbed_official | 31:42176bc3c368 | 98 | .data : AT (__etext) |
mbed_official | 31:42176bc3c368 | 99 | { |
mbed_official | 31:42176bc3c368 | 100 | __data_start__ = .; |
mbed_official | 31:42176bc3c368 | 101 | *(vtable) |
mbed_official | 31:42176bc3c368 | 102 | *(.data*) |
mbed_official | 31:42176bc3c368 | 103 | |
mbed_official | 31:42176bc3c368 | 104 | . = ALIGN(4); |
mbed_official | 31:42176bc3c368 | 105 | /* preinit data */ |
mbed_official | 31:42176bc3c368 | 106 | PROVIDE_HIDDEN (__preinit_array_start = .); |
mbed_official | 31:42176bc3c368 | 107 | KEEP(*(.preinit_array)) |
mbed_official | 31:42176bc3c368 | 108 | PROVIDE_HIDDEN (__preinit_array_end = .); |
mbed_official | 31:42176bc3c368 | 109 | |
mbed_official | 31:42176bc3c368 | 110 | . = ALIGN(4); |
mbed_official | 31:42176bc3c368 | 111 | /* init data */ |
mbed_official | 31:42176bc3c368 | 112 | PROVIDE_HIDDEN (__init_array_start = .); |
mbed_official | 31:42176bc3c368 | 113 | KEEP(*(SORT(.init_array.*))) |
mbed_official | 31:42176bc3c368 | 114 | KEEP(*(.init_array)) |
mbed_official | 31:42176bc3c368 | 115 | PROVIDE_HIDDEN (__init_array_end = .); |
mbed_official | 31:42176bc3c368 | 116 | |
mbed_official | 31:42176bc3c368 | 117 | |
mbed_official | 31:42176bc3c368 | 118 | . = ALIGN(4); |
mbed_official | 31:42176bc3c368 | 119 | /* finit data */ |
mbed_official | 31:42176bc3c368 | 120 | PROVIDE_HIDDEN (__fini_array_start = .); |
mbed_official | 31:42176bc3c368 | 121 | KEEP(*(SORT(.fini_array.*))) |
mbed_official | 31:42176bc3c368 | 122 | KEEP(*(.fini_array)) |
mbed_official | 31:42176bc3c368 | 123 | PROVIDE_HIDDEN (__fini_array_end = .); |
mbed_official | 31:42176bc3c368 | 124 | |
mbed_official | 31:42176bc3c368 | 125 | . = ALIGN(4); |
mbed_official | 31:42176bc3c368 | 126 | /* All data end */ |
mbed_official | 31:42176bc3c368 | 127 | __data_end__ = .; |
mbed_official | 31:42176bc3c368 | 128 | |
mbed_official | 31:42176bc3c368 | 129 | } > RAM |
mbed_official | 31:42176bc3c368 | 130 | |
mbed_official | 31:42176bc3c368 | 131 | .bss : |
mbed_official | 31:42176bc3c368 | 132 | { |
mbed_official | 31:42176bc3c368 | 133 | __bss_start__ = .; |
mbed_official | 31:42176bc3c368 | 134 | *(.bss*) |
mbed_official | 31:42176bc3c368 | 135 | *(COMMON) |
mbed_official | 31:42176bc3c368 | 136 | __bss_end__ = .; |
mbed_official | 31:42176bc3c368 | 137 | } > RAM |
mbed_official | 31:42176bc3c368 | 138 | |
mbed_official | 31:42176bc3c368 | 139 | .heap : |
mbed_official | 31:42176bc3c368 | 140 | { |
mbed_official | 31:42176bc3c368 | 141 | __end__ = .; |
mbed_official | 31:42176bc3c368 | 142 | end = __end__; |
mbed_official | 31:42176bc3c368 | 143 | *(.heap*) |
mbed_official | 31:42176bc3c368 | 144 | __HeapLimit = .; |
mbed_official | 31:42176bc3c368 | 145 | } > RAM |
mbed_official | 31:42176bc3c368 | 146 | |
mbed_official | 31:42176bc3c368 | 147 | /* .stack_dummy section doesn't contains any symbols. It is only |
mbed_official | 31:42176bc3c368 | 148 | * used for linker to calculate size of stack sections, and assign |
mbed_official | 31:42176bc3c368 | 149 | * values to stack symbols later */ |
mbed_official | 31:42176bc3c368 | 150 | .stack_dummy : |
mbed_official | 31:42176bc3c368 | 151 | { |
mbed_official | 31:42176bc3c368 | 152 | *(.stack) |
mbed_official | 31:42176bc3c368 | 153 | } > RAM |
mbed_official | 31:42176bc3c368 | 154 | |
mbed_official | 31:42176bc3c368 | 155 | /* Set stack top to end of RAM, and stack limit move down by |
mbed_official | 31:42176bc3c368 | 156 | * size of stack_dummy section */ |
mbed_official | 31:42176bc3c368 | 157 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
mbed_official | 31:42176bc3c368 | 158 | __StackLimit = __StackTop - SIZEOF(.stack_dummy); |
mbed_official | 31:42176bc3c368 | 159 | PROVIDE(__stack = __StackTop); |
mbed_official | 31:42176bc3c368 | 160 | |
mbed_official | 31:42176bc3c368 | 161 | /* Check if data + heap + stack exceeds RAM limit */ |
mbed_official | 31:42176bc3c368 | 162 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
mbed_official | 31:42176bc3c368 | 163 | } |