aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-LPC214x-GCC/Makefile
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-21 16:42:13 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-21 16:42:13 +0000
commitd1733a8bd3635776fe3c762891ede4abf77e2b24 (patch)
tree99f6ff7a601565e0cdea18a557cd9ee2775c0227 /demos/ARM7-LPC214x-GCC/Makefile
parentb3d17c3740b662c731e73031a7629eca4d275120 (diff)
downloadChibiOS-d1733a8bd3635776fe3c762891ede4abf77e2b24.tar.gz
ChibiOS-d1733a8bd3635776fe3c762891ede4abf77e2b24.tar.bz2
ChibiOS-d1733a8bd3635776fe3c762891ede4abf77e2b24.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@102 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-LPC214x-GCC/Makefile')
-rw-r--r--demos/ARM7-LPC214x-GCC/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/demos/ARM7-LPC214x-GCC/Makefile b/demos/ARM7-LPC214x-GCC/Makefile
index b078b8f88..6c0750add 100644
--- a/demos/ARM7-LPC214x-GCC/Makefile
+++ b/demos/ARM7-LPC214x-GCC/Makefile
@@ -127,10 +127,19 @@ CPFLAGS = $(MCFLAGS) $(OPT) $(WARN) -Wa,-ahlms=$(<:.c=.lst) $(DEFS)
LDFLAGS = $(MCFLAGS) -nostartfiles -T$(LDSCRIPT) -Wl,-Map=$(PROJECT).map,--cref,--no-warn-mismatch $(LIBDIR)
ODFLAGS = -x --syms
+# Thumb interwork enabled only if needed because it kills performance.
ifneq ($(TSRC),)
- ASFLAGS += -mthumb-interwork -D THUMB_INTERWORK
- CPFLAGS += -mthumb-interwork -D THUMB_INTERWORK
- LDFLAGS += -mthumb-interwork
+ ifneq ($(ASRC),)
+ # Both ARM and THUMB case
+ CPFLAGS += -mthumb-interwork -D THUMB
+ LDFLAGS += -mthumb-interwork
+ ASFLAGS += -mthumb-interwork -D THUMB
+ else
+ # Pure THUMB case, THUMB C code cannot be called by ARM asm code directly
+ CPFLAGS += -D THUMB
+ LDFLAGS += -mthumb
+ ASFLAGS += -mthumb-interwork -D THUMB -D PURE_THUMB
+ endif
endif
# Generate dependency information
@@ -148,7 +157,7 @@ $(AOBJS) : %.o : %.c
$(TOBJS) : %.o : %.c
@echo
- $(CC) -c $(CPFLAGS) $(TOPT) -I . $(INCDIR) $< -o $@
+ $(CC) -c $(CPFLAGS) $(TOPT) -mthumb -I . $(INCDIR) $< -o $@
$(ASMOBJS) : %.o : %.s
@echo