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:
minicube
Date:
Sun Oct 27 20:12:31 2013 +0000
Revision:
43:b3acfef78949
Parent:
42:7ca0bbba899b
mbed SDK; LPC1114FN28 use only

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bogdanm 13:0645d8841f51 1 /* mbed Microcontroller Library
bogdanm 13:0645d8841f51 2 * Copyright (c) 2006-2013 ARM Limited
bogdanm 13:0645d8841f51 3 *
bogdanm 13:0645d8841f51 4 * Licensed under the Apache License, Version 2.0 (the "License");
bogdanm 13:0645d8841f51 5 * you may not use this file except in compliance with the License.
bogdanm 13:0645d8841f51 6 * You may obtain a copy of the License at
bogdanm 13:0645d8841f51 7 *
bogdanm 13:0645d8841f51 8 * http://www.apache.org/licenses/LICENSE-2.0
bogdanm 13:0645d8841f51 9 *
bogdanm 13:0645d8841f51 10 * Unless required by applicable law or agreed to in writing, software
bogdanm 13:0645d8841f51 11 * distributed under the License is distributed on an "AS IS" BASIS,
bogdanm 13:0645d8841f51 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
bogdanm 13:0645d8841f51 13 * See the License for the specific language governing permissions and
bogdanm 13:0645d8841f51 14 * limitations under the License.
bogdanm 13:0645d8841f51 15 */
bogdanm 13:0645d8841f51 16 #ifndef MBED_CAN_API_H
bogdanm 13:0645d8841f51 17 #define MBED_CAN_API_H
bogdanm 13:0645d8841f51 18
bogdanm 13:0645d8841f51 19 #include "device.h"
bogdanm 13:0645d8841f51 20
bogdanm 13:0645d8841f51 21 #if DEVICE_CAN
bogdanm 13:0645d8841f51 22
bogdanm 13:0645d8841f51 23 #include "PinNames.h"
bogdanm 13:0645d8841f51 24 #include "PeripheralNames.h"
bogdanm 13:0645d8841f51 25 #include "can_helper.h"
bogdanm 13:0645d8841f51 26
bogdanm 13:0645d8841f51 27 #ifdef __cplusplus
bogdanm 13:0645d8841f51 28 extern "C" {
bogdanm 13:0645d8841f51 29 #endif
bogdanm 13:0645d8841f51 30
bogdanm 15:4892fe388435 31 typedef enum {
bogdanm 15:4892fe388435 32 IRQ_RX,
bogdanm 15:4892fe388435 33 IRQ_TX,
bogdanm 15:4892fe388435 34 IRQ_ERROR,
bogdanm 15:4892fe388435 35 IRQ_OVERRUN,
bogdanm 15:4892fe388435 36 IRQ_WAKEUP,
bogdanm 15:4892fe388435 37 IRQ_PASSIVE,
bogdanm 15:4892fe388435 38 IRQ_ARB,
bogdanm 15:4892fe388435 39 IRQ_BUS,
bogdanm 15:4892fe388435 40 IRQ_READY
bogdanm 15:4892fe388435 41 } CanIrqType;
bogdanm 15:4892fe388435 42
bogdanm 15:4892fe388435 43
bogdanm 15:4892fe388435 44 typedef enum {
bogdanm 15:4892fe388435 45 MODE_RESET,
bogdanm 15:4892fe388435 46 MODE_NORMAL,
bogdanm 15:4892fe388435 47 MODE_SILENT,
bogdanm 15:4892fe388435 48 MODE_TEST_GLOBAL,
bogdanm 15:4892fe388435 49 MODE_TEST_LOCAL,
bogdanm 15:4892fe388435 50 MODE_TEST_SILENT
bogdanm 15:4892fe388435 51 } CanMode;
bogdanm 15:4892fe388435 52
bogdanm 15:4892fe388435 53 typedef void (*can_irq_handler)(uint32_t id, CanIrqType type);
bogdanm 15:4892fe388435 54
bogdanm 13:0645d8841f51 55 typedef struct can_s can_t;
bogdanm 13:0645d8841f51 56
bogdanm 13:0645d8841f51 57 void can_init (can_t *obj, PinName rd, PinName td);
bogdanm 13:0645d8841f51 58 void can_free (can_t *obj);
bogdanm 13:0645d8841f51 59 int can_frequency(can_t *obj, int hz);
bogdanm 15:4892fe388435 60
bogdanm 15:4892fe388435 61 void can_irq_init (can_t *obj, can_irq_handler handler, uint32_t id);
bogdanm 15:4892fe388435 62 void can_irq_free (can_t *obj);
bogdanm 15:4892fe388435 63 void can_irq_set (can_t *obj, CanIrqType irq, uint32_t enable);
bogdanm 15:4892fe388435 64
bogdanm 13:0645d8841f51 65 int can_write (can_t *obj, CAN_Message, int cc);
mbed_official 41:e8b66477f5bf 66 int can_read (can_t *obj, CAN_Message *msg, int handle);
bogdanm 15:4892fe388435 67 int can_mode (can_t *obj, CanMode mode);
mbed_official 42:7ca0bbba899b 68 int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle);
bogdanm 13:0645d8841f51 69 void can_reset (can_t *obj);
bogdanm 13:0645d8841f51 70 unsigned char can_rderror (can_t *obj);
bogdanm 13:0645d8841f51 71 unsigned char can_tderror (can_t *obj);
bogdanm 13:0645d8841f51 72 void can_monitor (can_t *obj, int silent);
bogdanm 13:0645d8841f51 73
bogdanm 13:0645d8841f51 74 #ifdef __cplusplus
bogdanm 13:0645d8841f51 75 };
bogdanm 13:0645d8841f51 76 #endif
bogdanm 13:0645d8841f51 77
bogdanm 13:0645d8841f51 78 #endif // MBED_CAN_API_H
bogdanm 13:0645d8841f51 79
bogdanm 13:0645d8841f51 80 #endif