aboutsummaryrefslogtreecommitdiff
path: root/AT91SAM7S256/SAM7S256/gcc/Makefile
diff options
context:
space:
mode:
authorNicolas Schodet2012-02-11 17:39:48 +0100
committerNicolas Schodet2012-02-11 17:40:50 +0100
commiteb584f8d27a856e8f4d2ddebdd1173ff04217946 (patch)
tree83bbf94ff00b0120c3e37aeb3f725561b03f1c5d /AT91SAM7S256/SAM7S256/gcc/Makefile
parent35d4c19a154b0b4366876783eacb13bec27d288c (diff)
parent99a4c90dee42104638933096728bebc45e28bf1a (diff)
Merge branch 'master'
Conflicts: AT91SAM7S256/SAM7S256/Include/Cstartup.S AT91SAM7S256/SAM7S256/Include/sam7s256.c AT91SAM7S256/SAM7S256/gcc/Makefile AT91SAM7S256/SAM7S256/gcc/nxt.ld AT91SAM7S256/Source/c_comm.c AT91SAM7S256/Source/c_comm.h
Diffstat (limited to 'AT91SAM7S256/SAM7S256/gcc/Makefile')
-rw-r--r--AT91SAM7S256/SAM7S256/gcc/Makefile26
1 files changed, 18 insertions, 8 deletions
diff --git a/AT91SAM7S256/SAM7S256/gcc/Makefile b/AT91SAM7S256/SAM7S256/gcc/Makefile
index f8f8561..93334fa 100644
--- a/AT91SAM7S256/SAM7S256/gcc/Makefile
+++ b/AT91SAM7S256/SAM7S256/gcc/Makefile
@@ -1,6 +1,6 @@
BASE = ../..
-DBGDIR = $(BASE)/armdebug/Debugger
SRCDIR = $(BASE)/Source
+DBGDIR = $(BASE)/armdebug/Debugger
CPUINCDIR = $(BASE)/SAM7S256/Include
GIT_VERSION := $(shell git rev-parse --short=7 HEAD)
@@ -8,7 +8,10 @@ CUSTOM_FIRMWAREVERSION = $(GIT_VERSION)
TARGET = nxt_firmware
-ARM_SOURCES =
+# Set to 'y' to enable embedded debuger.
+ARMDEBUG = n
+
+ARM_SOURCES =
THUMB_SOURCES = c_button.c c_cmd.c c_comm.c c_display.c c_input.c c_ioctrl.c \
c_loader.c c_lowspeed.c c_output.c c_sound.c c_ui.c \
d_bt.c d_button.c d_display.c d_hispeed.c d_input.c \
@@ -18,23 +21,21 @@ THUMB_SOURCES = c_button.c c_cmd.c c_comm.c c_display.c c_input.c c_ioctrl.c \
abort.c errno.c sbrk.c strtod.c sscanf.c \
Cstartup_SAM7.c
-ASM_ARM_SOURCE = Cstartup.S abort_handler.S undef_handler.S debug_hexutils.S \
- debug_stub.S debug_comm.S debug_opcodes.S debug_runlooptasks.S
+ASM_ARM_SOURCE = Cstartup.S
ASM_THUMB_SOURCE =
vpath %.c $(SRCDIR)
vpath %.c $(CPUINCDIR)
vpath %.c lib
-vpath %.S $(CPUINCDIR) $(DBGDIR)
+vpath %.S $(CPUINCDIR)
-INCLUDES = -I../../armdebug/Debugger
+INCLUDES =
MCU = arm7tdmi
-DEBUG_DEFINES = -D__ARMDEBUG__
STARTOFUSERFLASH_DEFINES = -DSTARTOFUSERFLASH_FROM_LINKER=1
VERSION_DEFINES = -DCUSTOM_FIRMWAREVERSION=\"$(CUSTOM_FIRMWAREVERSION)\"
DEFINES = -DPROTOTYPE_PCB_4 -DNEW_MENU -DROM_RUN -DVECTORS_IN_RAM \
- $(STARTOFUSERFLASH_DEFINES) $(VERSION_DEFINES) $(DEBUG_DEFINES)
+ $(STARTOFUSERFLASH_DEFINES) $(VERSION_DEFINES)
OPTIMIZE = -Os -fno-strict-aliasing \
-ffunction-sections -fdata-sections
WARNINGS = -Wall -W -Wundef -Wno-unused -Wno-format
@@ -46,6 +47,15 @@ LDSCRIPT = nxt.ld
LDFLAGS = -nostdlib -T $(LDSCRIPT) -Wl,--gc-sections
LDLIBS = -lc -lm -lgcc
+ifeq ($(ARMDEBUG),y)
+ASM_ARM_SOURCE += abort_handler.S undef_handler.S debug_hexutils.S \
+ debug_stub.S debug_comm.S debug_opcodes.S \
+ debug_runlooptasks.S
+vpath %.S $(DBGDIR)
+DEFINES += -DARMDEBUG
+INCLUDES += -I../../armdebug/Debugger
+endif
+
CROSS_COMPILE = arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
OBJDUMP = $(CROSS_COMPILE)objdump