git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6937 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2014-05-14 08:56:55 +00:00
parent be29b288e5
commit d6d0322077
1 changed files with 54 additions and 12 deletions

View File

@ -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. # 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 # Compiler options
OPT = $(USE_OPT) OPT = $(USE_OPT)
COPT = $(USE_COPT) COPT = $(USE_COPT)
@ -37,6 +27,58 @@ ifeq ($(USE_LTO),yes)
OPT += -flto OPT += -flto
endif 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 # Source files groups and paths
ifeq ($(USE_THUMB),yes) ifeq ($(USE_THUMB),yes)
TCSRC += $(CSRC) TCSRC += $(CSRC)