diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-24 00:56:49 +0100 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2011-01-24 00:56:49 +0100 |
commit | c437f86b84ef0a5c98a52009489313497a5086e4 (patch) | |
tree | a18504a65f1a304e4da5aa2b60c710e48b88a866 /config | |
parent | 598e538787c7cf9d8aff9bc57f5d6ce5724cd4cb (diff) |
Adding a few makefiles.
Diffstat (limited to 'config')
-rw-r--r-- | config/general.mk | 1 | ||||
-rw-r--r-- | config/target.mk | 8 | ||||
-rw-r--r-- | config/toolchain.mk | 14 |
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 |