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:
mbed_official
Date:
Mon Oct 07 09:15:08 2013 +0100
Revision:
33:e214068ab66c
Synchronized with git revision 53edc82f7373bbfa01a161700524765f52fdb444

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 33:e214068ab66c 1 /* mbed Microcontroller Library - stackheap
mbed_official 33:e214068ab66c 2 * Copyright (C) 2009-2011 ARM Limited. All rights reserved.
mbed_official 33:e214068ab66c 3 *
mbed_official 33:e214068ab66c 4 * Setup a fixed single stack/heap memory model,
mbed_official 33:e214068ab66c 5 * between the top of the RW/ZI region and the stackpointer
mbed_official 33:e214068ab66c 6 */
mbed_official 33:e214068ab66c 7
mbed_official 33:e214068ab66c 8 #ifdef __cplusplus
mbed_official 33:e214068ab66c 9 extern "C" {
mbed_official 33:e214068ab66c 10 #endif
mbed_official 33:e214068ab66c 11
mbed_official 33:e214068ab66c 12 #include <rt_misc.h>
mbed_official 33:e214068ab66c 13 #include <stdint.h>
mbed_official 33:e214068ab66c 14
mbed_official 33:e214068ab66c 15 extern char Image$$RW_IRAM1$$ZI$$Limit[];
mbed_official 33:e214068ab66c 16
mbed_official 33:e214068ab66c 17 extern __value_in_regs struct __initial_stackheap __user_setup_stackheap(uint32_t R0, uint32_t R1, uint32_t R2, uint32_t R3) {
mbed_official 33:e214068ab66c 18 uint32_t zi_limit = (uint32_t)Image$$RW_IRAM1$$ZI$$Limit;
mbed_official 33:e214068ab66c 19 uint32_t sp_limit = __current_sp();
mbed_official 33:e214068ab66c 20
mbed_official 33:e214068ab66c 21 zi_limit = (zi_limit + 7) & ~0x7; // ensure zi_limit is 8-byte aligned
mbed_official 33:e214068ab66c 22
mbed_official 33:e214068ab66c 23 struct __initial_stackheap r;
mbed_official 33:e214068ab66c 24 r.heap_base = zi_limit;
mbed_official 33:e214068ab66c 25 r.heap_limit = sp_limit;
mbed_official 33:e214068ab66c 26 return r;
mbed_official 33:e214068ab66c 27 }
mbed_official 33:e214068ab66c 28
mbed_official 33:e214068ab66c 29 #ifdef __cplusplus
mbed_official 33:e214068ab66c 30 }
mbed_official 33:e214068ab66c 31 #endif