From 80c3ff5fa03429f1e4ea15032f665ceb88c9b8c3 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 18 Jun 2014 02:22:59 +0900 Subject: [PATCH] Fix build files for mbed --- .gitignore | 2 ++ keyboard/mbed_onekey/Makefile | 13 ++++--------- .../mbed_onekey => protocol/mbed}/HIDKeyboard.cpp | 0 .../mbed_onekey => protocol/mbed}/HIDKeyboard.h | 0 .../mbed_onekey => protocol/mbed}/mbed_driver.cpp | 0 .../mbed_onekey => protocol/mbed}/mbed_driver.h | 0 {keyboard/mbed_onekey => tool/mbed}/common.mk | 0 {keyboard/mbed_onekey => tool/mbed}/gcc.mk | 0 {keyboard/mbed_onekey => tool/mbed}/mbed.mk | 7 +++++++ 9 files changed, 13 insertions(+), 9 deletions(-) rename {keyboard/mbed_onekey => protocol/mbed}/HIDKeyboard.cpp (100%) rename {keyboard/mbed_onekey => protocol/mbed}/HIDKeyboard.h (100%) rename {keyboard/mbed_onekey => protocol/mbed}/mbed_driver.cpp (100%) rename {keyboard/mbed_onekey => protocol/mbed}/mbed_driver.h (100%) rename {keyboard/mbed_onekey => tool/mbed}/common.mk (100%) rename {keyboard/mbed_onekey => tool/mbed}/gcc.mk (100%) rename {keyboard/mbed_onekey => tool/mbed}/mbed.mk (97%) diff --git a/.gitignore b/.gitignore index c25d41d23..b79d72b7c 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ *.map *.sym tags +build/ +*.bak diff --git a/keyboard/mbed_onekey/Makefile b/keyboard/mbed_onekey/Makefile index e686f424e..d0d1148ce 100644 --- a/keyboard/mbed_onekey/Makefile +++ b/keyboard/mbed_onekey/Makefile @@ -1,7 +1,4 @@ -# This file was automagically generated by mbed.org. For more information, -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -PROJECT = USBKeyboard_HelloWorld +PROJECT = mbed_onekey TMK_DIR = ../.. MBED_DIR = ./mbed-sdk @@ -14,8 +11,6 @@ vpath %.cpp .:$(MBED_DIR):$(TMK_DIR) OBJDIR = ./build OBJECTS = \ - $(OBJDIR)/./HIDKeyboard.o \ - $(OBJDIR)/./mbed_driver.o \ $(OBJDIR)/./main.o CONFIG_H = config.h @@ -33,6 +28,6 @@ LIBRARIES = MOUSEKEY_ENABLE = yes -include mbed.mk -include common.mk -include gcc.mk +include $(TMK_DIR)/tool/mbed/mbed.mk +include $(TMK_DIR)/tool/mbed/common.mk +include $(TMK_DIR)/tool/mbed/gcc.mk diff --git a/keyboard/mbed_onekey/HIDKeyboard.cpp b/protocol/mbed/HIDKeyboard.cpp similarity index 100% rename from keyboard/mbed_onekey/HIDKeyboard.cpp rename to protocol/mbed/HIDKeyboard.cpp diff --git a/keyboard/mbed_onekey/HIDKeyboard.h b/protocol/mbed/HIDKeyboard.h similarity index 100% rename from keyboard/mbed_onekey/HIDKeyboard.h rename to protocol/mbed/HIDKeyboard.h diff --git a/keyboard/mbed_onekey/mbed_driver.cpp b/protocol/mbed/mbed_driver.cpp similarity index 100% rename from keyboard/mbed_onekey/mbed_driver.cpp rename to protocol/mbed/mbed_driver.cpp diff --git a/keyboard/mbed_onekey/mbed_driver.h b/protocol/mbed/mbed_driver.h similarity index 100% rename from keyboard/mbed_onekey/mbed_driver.h rename to protocol/mbed/mbed_driver.h diff --git a/keyboard/mbed_onekey/common.mk b/tool/mbed/common.mk similarity index 100% rename from keyboard/mbed_onekey/common.mk rename to tool/mbed/common.mk diff --git a/keyboard/mbed_onekey/gcc.mk b/tool/mbed/gcc.mk similarity index 100% rename from keyboard/mbed_onekey/gcc.mk rename to tool/mbed/gcc.mk diff --git a/keyboard/mbed_onekey/mbed.mk b/tool/mbed/mbed.mk similarity index 97% rename from keyboard/mbed_onekey/mbed.mk rename to tool/mbed/mbed.mk index 962a05e6e..0f12ee2af 100644 --- a/keyboard/mbed_onekey/mbed.mk +++ b/tool/mbed/mbed.mk @@ -89,4 +89,11 @@ INCLUDE_PATHS += \ -I$(MBED_DIR)/libraries/USBDevice/USBMSD \ -I$(MBED_DIR)/libraries/USBDevice/USBMIDI +OBJECTS += \ + $(OBJDIR)/protocol/mbed/mbed_driver.o \ + $(OBJDIR)/protocol/mbed/HIDKeyboard.o \ + +INCLUDE_PATHS += \ + -I$(TMK_DIR)/protocol/mbed + LINKER_SCRIPT = $(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_NXP/TARGET_LPC11UXX/TOOLCHAIN_GCC_ARM/TARGET_LPC11U35_401/LPC11U35.ld