Fork of mbed-src file paths change. LPC1114FN28 use only.

Fork of mbed-src by mbed official

Information

この情報は2013/10/28時点での解決方法です。
現在はmbed-src、標準ライブラリで問題なくコンパイルが可能です。

・使う物
LPC1114FN28
mbed SDK

LPC1114FN28でmbed-SDKのLibraryを使うとCompile出来ない。(2013/10/28) /media/uploads/minicube/mbed_lpc1114_sdk.png

パスが通ってないだけのようなのでファイルを以下に移動する。

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\

へ移動

移動後は以下のような構成になると思います。
※不要なファイルは削除してあります。

/media/uploads/minicube/mbed_lpc1114_sdk_tree.png


ファイルの移動が面倒なので以下に本家からフォークしたライブラリを置いておきます。

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されるため上記のエラーになるようです。

Committer:
bogdanm
Date:
Mon Aug 05 14:12:34 2013 +0300
Revision:
13:0645d8841f51
Update mbed sources to revision 64

Who changed what in which revision?

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