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
Parent:
vendor/NXP/LPC1768/cmsis/IAR/LPC17xx.icf@10:3bc89ef62ce7
Update mbed sources to revision 64

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 10:3bc89ef62ce7 1 /* [ROM] */
emilmont 10:3bc89ef62ce7 2 define symbol __intvec_start__ = 0x00000000;
emilmont 10:3bc89ef62ce7 3 define symbol __region_ROM_start__ = 0x00000000;
emilmont 10:3bc89ef62ce7 4 define symbol __CRP_start__ = 0x000002FC;
emilmont 10:3bc89ef62ce7 5 define symbol __CRP_end__ = 0x000002FF;
emilmont 10:3bc89ef62ce7 6 define symbol __region_ROM_end__ = 0x0007FFFF;
emilmont 10:3bc89ef62ce7 7
emilmont 10:3bc89ef62ce7 8 /* [RAM] Vector table dynamic copy: 8_byte_aligned(49 vect * 4 bytes) = 8_byte_aligned(0xC4) = 0xC8*/
emilmont 10:3bc89ef62ce7 9 define symbol __NVIC_start__ = 0x10000000;
emilmont 10:3bc89ef62ce7 10 define symbol __NVIC_end__ = 0x100000C7;
emilmont 10:3bc89ef62ce7 11 define symbol __region_RAM_start__ = 0x100000C8;
emilmont 10:3bc89ef62ce7 12 define symbol __region_RAM_end__ = 0x1000FFDF;
emilmont 10:3bc89ef62ce7 13 define symbol _AHB_RAM_start__ = 0x2007C000;
emilmont 10:3bc89ef62ce7 14 define symbol _AHB_RAM_end__ = 0x20083FFF;
emilmont 10:3bc89ef62ce7 15
emilmont 10:3bc89ef62ce7 16 /* Memory regions */
emilmont 10:3bc89ef62ce7 17 define memory mem with size = 4G;
emilmont 10:3bc89ef62ce7 18
emilmont 10:3bc89ef62ce7 19 define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__] - mem:[from __CRP_start__ to __CRP_end__];
emilmont 10:3bc89ef62ce7 20 define region CRP_region = mem:[from __CRP_start__ to __CRP_end__];
emilmont 10:3bc89ef62ce7 21
emilmont 10:3bc89ef62ce7 22 define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
emilmont 10:3bc89ef62ce7 23 define region AHB_RAM_region = mem:[from _AHB_RAM_start__ to _AHB_RAM_end__];
emilmont 10:3bc89ef62ce7 24
emilmont 10:3bc89ef62ce7 25 /* Stack and Heap */
emilmont 10:3bc89ef62ce7 26 define symbol __size_cstack__ = 0x800;
emilmont 10:3bc89ef62ce7 27 define symbol __size_heap__ = 0x800;
emilmont 10:3bc89ef62ce7 28 define block CSTACK with alignment = 8, size = __size_cstack__ { };
emilmont 10:3bc89ef62ce7 29 define block HEAP with alignment = 8, size = __size_heap__ { };
emilmont 10:3bc89ef62ce7 30 define block STACKHEAP with fixed order { block HEAP, block CSTACK };
emilmont 10:3bc89ef62ce7 31
emilmont 10:3bc89ef62ce7 32 initialize by copy with packing = zeros { readwrite };
emilmont 10:3bc89ef62ce7 33 do not initialize { section .noinit };
emilmont 10:3bc89ef62ce7 34
emilmont 10:3bc89ef62ce7 35 place at address mem:__intvec_start__ { section .intvec };
emilmont 10:3bc89ef62ce7 36 place at address mem:0x2FC { section CRPKEY };
emilmont 10:3bc89ef62ce7 37 place in ROM_region { readonly };
emilmont 10:3bc89ef62ce7 38 place in RAM_region { readwrite, block STACKHEAP };
emilmont 10:3bc89ef62ce7 39 place in AHB_RAM_region { section USB_RAM };
emilmont 10:3bc89ef62ce7 40 place in CRP_region { section .crp };