summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/general.mk1
-rw-r--r--config/target.mk8
-rw-r--r--config/toolchain.mk14
3 files changed, 23 insertions, 0 deletions
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