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:
emilmont
Date:
Wed Mar 13 15:04:05 2013 +0000
Revision:
4:c4bfb462ca53
Add default LED patterns for error notification; Add module for common logic for sorted linked list of events; Move the PinName parsing to the RPC library;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 4:c4bfb462ca53 1 /* mbed Microcontroller Library
emilmont 4:c4bfb462ca53 2 * Copyright (c) 2006-2013 ARM Limited
emilmont 4:c4bfb462ca53 3 *
emilmont 4:c4bfb462ca53 4 * Licensed under the Apache License, Version 2.0 (the "License");
emilmont 4:c4bfb462ca53 5 * you may not use this file except in compliance with the License.
emilmont 4:c4bfb462ca53 6 * You may obtain a copy of the License at
emilmont 4:c4bfb462ca53 7 *
emilmont 4:c4bfb462ca53 8 * http://www.apache.org/licenses/LICENSE-2.0
emilmont 4:c4bfb462ca53 9 *
emilmont 4:c4bfb462ca53 10 * Unless required by applicable law or agreed to in writing, software
emilmont 4:c4bfb462ca53 11 * distributed under the License is distributed on an "AS IS" BASIS,
emilmont 4:c4bfb462ca53 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
emilmont 4:c4bfb462ca53 13 * See the License for the specific language governing permissions and
emilmont 4:c4bfb462ca53 14 * limitations under the License.
emilmont 4:c4bfb462ca53 15 */
emilmont 4:c4bfb462ca53 16 #include "gpio_api.h"
emilmont 4:c4bfb462ca53 17 #include "wait_api.h"
emilmont 4:c4bfb462ca53 18 #include "toolchain.h"
emilmont 4:c4bfb462ca53 19
emilmont 4:c4bfb462ca53 20 WEAK void mbed_die(void);
emilmont 4:c4bfb462ca53 21 WEAK void mbed_die(void) {
emilmont 4:c4bfb462ca53 22 #if defined(DEVICE_ERROR_RED)
emilmont 4:c4bfb462ca53 23 gpio_t led_red; gpio_init(&led_red, LED_RED, PIN_OUTPUT);
emilmont 4:c4bfb462ca53 24
emilmont 4:c4bfb462ca53 25 #elif defined(DEVICE_ERROR_PATTERN)
emilmont 4:c4bfb462ca53 26 gpio_t led_1; gpio_init(&led_1, LED1, PIN_OUTPUT);
emilmont 4:c4bfb462ca53 27 gpio_t led_2; gpio_init(&led_2, LED2, PIN_OUTPUT);
emilmont 4:c4bfb462ca53 28 gpio_t led_3; gpio_init(&led_3, LED3, PIN_OUTPUT);
emilmont 4:c4bfb462ca53 29 gpio_t led_4; gpio_init(&led_4, LED4, PIN_OUTPUT);
emilmont 4:c4bfb462ca53 30 #endif
emilmont 4:c4bfb462ca53 31
emilmont 4:c4bfb462ca53 32 while (1) {
emilmont 4:c4bfb462ca53 33 #if defined(DEVICE_ERROR_RED)
emilmont 4:c4bfb462ca53 34 gpio_write(&led_red, 1);
emilmont 4:c4bfb462ca53 35
emilmont 4:c4bfb462ca53 36 #elif defined(DEVICE_ERROR_PATTERN)
emilmont 4:c4bfb462ca53 37 gpio_write(&led_1, 1);
emilmont 4:c4bfb462ca53 38 gpio_write(&led_2, 0);
emilmont 4:c4bfb462ca53 39 gpio_write(&led_3, 0);
emilmont 4:c4bfb462ca53 40 gpio_write(&led_4, 1);
emilmont 4:c4bfb462ca53 41 #endif
emilmont 4:c4bfb462ca53 42 wait_ms(150);
emilmont 4:c4bfb462ca53 43
emilmont 4:c4bfb462ca53 44 #if defined(DEVICE_ERROR_RED)
emilmont 4:c4bfb462ca53 45 gpio_write(&led_red, 0);
emilmont 4:c4bfb462ca53 46
emilmont 4:c4bfb462ca53 47 #elif defined(DEVICE_ERROR_PATTERN)
emilmont 4:c4bfb462ca53 48 gpio_write(&led_1, 0);
emilmont 4:c4bfb462ca53 49 gpio_write(&led_2, 1);
emilmont 4:c4bfb462ca53 50 gpio_write(&led_3, 1);
emilmont 4:c4bfb462ca53 51 gpio_write(&led_4, 0);
emilmont 4:c4bfb462ca53 52 #endif
emilmont 4:c4bfb462ca53 53 wait_ms(150);
emilmont 4:c4bfb462ca53 54 }
emilmont 4:c4bfb462ca53 55 }