aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/ARM
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-05-14 08:56:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-05-14 08:56:55 +0000
commitd6d03220772af31f250d1606a1b7e9644bceb801 (patch)
treee799ad91ca4c651b93fce5d7da0ffcc480e0ab96 /os/common/ports/ARM
parentbe29b288e58e0f95249dc57d6078655ff08b298c (diff)
downloadChibiOS-d6d03220772af31f250d1606a1b7e9644bceb801.tar.gz
ChibiOS-d6d03220772af31f250d1606a1b7e9644bceb801.tar.bz2
ChibiOS-d6d03220772af31f250d1606a1b7e9644bceb801.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6937 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common/ports/ARM')
-rw-r--r--os/common/ports/ARM/compilers/GCC/rules.mk66
1 files changed, 54 insertions, 12 deletions
diff --git a/os/common/ports/ARM/compilers/GCC/rules.mk b/os/common/ports/ARM/compilers/GCC/rules.mk
index 24020086d..1bf494357 100644
--- a/os/common/ports/ARM/compilers/GCC/rules.mk
+++ b/os/common/ports/ARM/compilers/GCC/rules.mk
@@ -1,19 +1,9 @@
-# ARM common makefile scripts and rules.
+# ARM Cortex-Mx common makefile scripts and rules.
##############################################################################
# Processing options coming from the upper Makefile.
#
-# Output directory and files
-ifeq ($(BUILDDIR),)
- BUILDDIR = build
-endif
-ifeq ($(BUILDDIR),.)
- BUILDDIR = build
-endif
-OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \
- $(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).dmp
-
# Compiler options
OPT = $(USE_OPT)
COPT = $(USE_COPT)
@@ -37,6 +27,58 @@ ifeq ($(USE_LTO),yes)
OPT += -flto
endif
+# Undefined state stack size
+ifeq ($(USE_UND_STACKSIZE),)
+ LDOPT := $(LDOPT),--defsym=__und_stack_size__=8
+else
+ LDOPT := $(LDOPT),--defsym=__und_stack_size__=$(USE_UND_STACKSIZE)
+endif
+
+# Abort stack size
+ifeq ($(USE_ABT_STACKSIZE),)
+ LDOPT := $(LDOPT),--defsym=__abt_stack_size__=8
+else
+ LDOPT := $(LDOPT),--defsym=__abt_stack_size__=$(USE_ABT_STACKSIZE)
+endif
+
+# FIQ stack size
+ifeq ($(USE_FIQ_STACKSIZE),)
+ LDOPT := $(LDOPT),--defsym=__fiq_stack_size__=64
+else
+ LDOPT := $(LDOPT),--defsym=__fiq_stack_size__=$(USE_FIQ_STACKSIZE)
+endif
+
+# IRQ stack size
+ifeq ($(USE_IRQ_STACKSIZE),)
+ LDOPT := $(LDOPT),--defsym=__irq_stack_size__=0x400
+else
+ LDOPT := $(LDOPT),--defsym=__irq_stack_size__=$(USE_IRQ_STACKSIZE)
+endif
+
+# Supervisor stack size
+ifeq ($(USE_SUPERVISOR_STACKSIZE),)
+ LDOPT := $(LDOPT),--defsym=__svc_stack_size__=8
+else
+ LDOPT := $(LDOPT),--defsym=__svc_stack_size__=$(USE_SUPERVISOR_STACKSIZE)
+endif
+
+# System stack size
+ifeq ($(USE_SYSTEM_STACKSIZE),)
+ LDOPT := $(LDOPT),--defsym=__sys_stack_size__=0x400
+else
+ LDOPT := $(LDOPT),--defsym=__sys_stack_size__=$(USE_SYSTEM_STACKSIZE)
+endif
+
+# Output directory and files
+ifeq ($(BUILDDIR),)
+ BUILDDIR = build
+endif
+ifeq ($(BUILDDIR),.)
+ BUILDDIR = build
+endif
+OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \
+ $(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).dmp
+
# Source files groups and paths
ifeq ($(USE_THUMB),yes)
TCSRC += $(CSRC)
@@ -182,7 +224,7 @@ endif
$(ASMXOBJS) : $(OBJDIR)/%.o : %.S Makefile
ifeq ($(USE_VERBOSE_COMPILE),yes)
- @echo
+ @echo
$(CC) -c $(ASXFLAGS) $(TOPT) -I. $(IINCDIR) $< -o $@
else
@echo Compiling $(<F)