aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorGregwar <g.passault@gmail.com>2014-04-23 16:45:23 +0200
committerGregwar <g.passault@gmail.com>2014-04-23 22:22:41 +0200
commit3c8ded4743c09a7b0c7737392d4e4c15e6959852 (patch)
treead50fd91846490111cff6c04a6753d1bf0036213 /Makefile
parent139e4b1a1ae547540d32aa66d47c4e69b1b57bbf (diff)
downloadlibrambutan-3c8ded4743c09a7b0c7737392d4e4c15e6959852.tar.gz
librambutan-3c8ded4743c09a7b0c7737392d4e4c15e6959852.zip
Adding BOOTLOADER option to support Robotis bootloader different ROM
Signed-off-by: Grégoire Passault <g.passault@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1f19f37..80653a7 100644
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,9 @@ BOARD_INCLUDE_DIR := $(MAKEDIR)/board-includes
BOARD ?= maple
MEMORY_TARGET ?= flash
+# Chooses the bootloader, available: maple and robotis
+BOOTLOADER ?= maple
+
# $(BOARD)- and $(MEMORY_TARGET)-specific configuration
include $(MAKEDIR)/target-config.mk
@@ -56,7 +59,8 @@ TARGET_FLAGS += -I$(LIBMAPLE_PATH)/include/libmaple \
TARGET_FLAGS += -I$(LIBRARIES_PATH) # for internal lib. includes, e.g. <Wire/WireBase.h>
GLOBAL_CFLAGS := -Os -g3 -gdwarf-2 -nostdlib \
-ffunction-sections -fdata-sections \
- -Wl,--gc-sections $(TARGET_FLAGS)
+ -Wl,--gc-sections $(TARGET_FLAGS) \
+ -DBOOTLOADER_$(BOOTLOADER)
GLOBAL_CXXFLAGS := -fno-rtti -fno-exceptions -Wall $(TARGET_FLAGS)
GLOBAL_ASFLAGS := -x assembler-with-cpp $(TARGET_FLAGS)
LDFLAGS = $(TARGET_LDFLAGS) $(TOOLCHAIN_LDFLAGS) -mcpu=cortex-m3 -mthumb \