From c437f86b84ef0a5c98a52009489313497a5086e4 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 24 Jan 2011 00:56:49 +0100 Subject: Adding a few makefiles. --- config/general.mk | 1 + config/target.mk | 8 ++++++++ config/toolchain.mk | 14 ++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 config/general.mk create mode 100644 config/target.mk create mode 100644 config/toolchain.mk (limited to 'config') diff --git a/config/general.mk b/config/general.mk new file mode 100644 index 0000000..5d0ecca --- /dev/null +++ b/config/general.mk @@ -0,0 +1 @@ +VERBOSE = true diff --git a/config/target.mk b/config/target.mk new file mode 100644 index 0000000..2b3a3a2 --- /dev/null +++ b/config/target.mk @@ -0,0 +1,8 @@ +export BOARD = mbed +export USE_MPU = true + + +ifeq ($(BOARD),mbed) +export CPU = arm +export CPU_FLAVOR = lpc1768 +endif diff --git a/config/toolchain.mk b/config/toolchain.mk new file mode 100644 index 0000000..aeaee87 --- /dev/null +++ b/config/toolchain.mk @@ -0,0 +1,14 @@ +ifeq ($(CPU),arm) +TOOLCHAIN = arm-none-eabi +ifeq ($(CPU_FLAVOR),lpc1768) +TARGET_CPPFLAGS += -mcpu=cortex-m3 -mtune=cortex-m3 -D__thumb2__=1 -march=armv7-m -mfix-cortex-m3-ldrd +endif +TARGET_CPPFLAGS += -mthumb -Os -mapcs-frame -msoft-float -mno-sched-prolog -fno-hosted -ffunction-sections -fdata-sections +endif + +TARGET_CC = $(TOOLCHAIN)-gcc +TARGET_CXX = $(TOOLCHAIN)-g++ +TARGET_LD = $(TOOLCHAIN)-gcc +TARGET_RANLIB = $(TOOLCHAIN)-ranlib +TARGET_AR = $(TOOLCHAIN)-ar +TARGET_OBJCOPY = $(TOOLCHAIN)-objcopy -- cgit v1.2.3