diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-09-22 07:08:16 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2017-09-22 07:08:16 +0000 |
commit | d3c129951cebb170827c3a9e2cdd9ce38d34f252 (patch) | |
tree | d3b44a42d76a902a0e78fae8f93dbd10687d40a8 /os/common | |
parent | 387c44dc6b8129f2e99cacccc8e48be602441d1a (diff) | |
download | ChibiOS-d3c129951cebb170827c3a9e2cdd9ce38d34f252.tar.gz ChibiOS-d3c129951cebb170827c3a9e2cdd9ce38d34f252.tar.bz2 ChibiOS-d3c129951cebb170827c3a9e2cdd9ce38d34f252.zip |
TABs cleanup.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10663 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/common')
-rw-r--r-- | os/common/startup/ARM/compilers/GCC/rules.mk | 6 | ||||
-rw-r--r-- | os/common/startup/ARMCMx/compilers/GCC/rules.mk | 6 | ||||
-rw-r--r-- | os/common/startup/SIMIA32/compilers/GCC/rules.mk | 8 | ||||
-rw-r--r-- | os/common/startup/e200/compilers/GCC/rules.mk | 10 | ||||
-rw-r--r-- | os/common/startup/e200/compilers/GHS/rules.mk | 79 |
5 files changed, 55 insertions, 54 deletions
diff --git a/os/common/startup/ARM/compilers/GCC/rules.mk b/os/common/startup/ARM/compilers/GCC/rules.mk index 5409531a8..8ea09a5c7 100644 --- a/os/common/startup/ARM/compilers/GCC/rules.mk +++ b/os/common/startup/ARM/compilers/GCC/rules.mk @@ -112,7 +112,7 @@ TCOBJS = $(addprefix $(OBJDIR)/, $(notdir $(TCSRC:.c=.o))) TCPPOBJS = $(addprefix $(OBJDIR)/, $(notdir $(TCPPSRC:.cpp=.o)))
ASMOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMSRC:.s=.o)))
ASMXOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMXSRC:.S=.o)))
-OBJS = $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
+OBJS = $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
# Paths
IINCDIR = $(patsubst %,-I%,$(INCDIR) $(DINCDIR) $(UINCDIR))
@@ -120,14 +120,14 @@ LLIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR)) # Macros
DEFS = $(DDEFS) $(UDEFS)
-ADEFS = $(DADEFS) $(UADEFS)
+ADEFS = $(DADEFS) $(UADEFS)
# Libs
LIBS = $(DLIBS) $(ULIBS)
# Various settings
MCFLAGS = -mcpu=$(MCU)
-ODFLAGS = -x --syms
+ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
diff --git a/os/common/startup/ARMCMx/compilers/GCC/rules.mk b/os/common/startup/ARMCMx/compilers/GCC/rules.mk index b204aec65..578a654de 100644 --- a/os/common/startup/ARMCMx/compilers/GCC/rules.mk +++ b/os/common/startup/ARMCMx/compilers/GCC/rules.mk @@ -108,7 +108,7 @@ TCOBJS := $(addprefix $(OBJDIR)/, $(notdir $(TCSRC:.c=.o))) TCPPOBJS := $(addprefix $(OBJDIR)/, $(notdir $(TCPPSRC:.cpp=.o)))
ASMOBJS := $(addprefix $(OBJDIR)/, $(notdir $(ASMSRC:.s=.o)))
ASMXOBJS := $(addprefix $(OBJDIR)/, $(notdir $(ASMXSRC:.S=.o)))
-OBJS := $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
+OBJS := $(ASMXOBJS) $(ASMOBJS) $(ACOBJS) $(TCOBJS) $(ACPPOBJS) $(TCPPOBJS)
# Paths
IINCDIR := $(patsubst %,-I%,$(INCDIR) $(DINCDIR) $(UINCDIR))
@@ -117,14 +117,14 @@ LLIBDIR += -L$(dir $(LDSCRIPT)) # Macros
DEFS := $(DDEFS) $(UDEFS)
-ADEFS := $(DADEFS) $(UADEFS)
+ADEFS := $(DADEFS) $(UADEFS)
# Libs
LIBS := $(DLIBS) $(ULIBS)
# Various settings
MCFLAGS := -mcpu=$(MCU)
-ODFLAGS = -x --syms
+ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
diff --git a/os/common/startup/SIMIA32/compilers/GCC/rules.mk b/os/common/startup/SIMIA32/compilers/GCC/rules.mk index b0439941f..899aa69a3 100644 --- a/os/common/startup/SIMIA32/compilers/GCC/rules.mk +++ b/os/common/startup/SIMIA32/compilers/GCC/rules.mk @@ -46,7 +46,7 @@ endif OUTFILES = $(BUILDDIR)/$(PROJECT)
# Source files groups and paths
-SRC = $(CSRC)$(CPPSRC)
+SRC = $(CSRC)$(CPPSRC)
SRCPATHS = $(sort $(dir $(ASMXSRC)) $(dir $(ASMSRC)) $(dir $(SRC)))
# Various directories
@@ -58,7 +58,7 @@ COBJS = $(addprefix $(OBJDIR)/, $(notdir $(CSRC:.c=.o))) CPPOBJS = $(addprefix $(OBJDIR)/, $(notdir $(CPPSRC:.cpp=.o)))
ASMOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMSRC:.s=.o)))
ASMXOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMXSRC:.S=.o)))
-OBJS = $(ASMXOBJS) $(ASMOBJS) $(COBJS) $(CPPOBJS)
+OBJS = $(ASMXOBJS) $(ASMOBJS) $(COBJS) $(CPPOBJS)
# Paths
IINCDIR = $(patsubst %,-I%,$(INCDIR) $(DINCDIR) $(UINCDIR))
@@ -66,14 +66,14 @@ LLIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR)) # Macros
DEFS = $(DDEFS) $(UDEFS)
-ADEFS = $(DADEFS) $(UADEFS)
+ADEFS = $(DADEFS) $(UADEFS)
# Libs
LIBS = $(DLIBS) $(ULIBS)
# Various settings
MCFLAGS =
-ODFLAGS = -x --syms
+ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
diff --git a/os/common/startup/e200/compilers/GCC/rules.mk b/os/common/startup/e200/compilers/GCC/rules.mk index ab8c54b4d..820c56aa2 100644 --- a/os/common/startup/e200/compilers/GCC/rules.mk +++ b/os/common/startup/e200/compilers/GCC/rules.mk @@ -69,10 +69,10 @@ endif OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \
$(BUILDDIR)/$(PROJECT).mot $(BUILDDIR)/$(PROJECT).bin \
- $(BUILDDIR)/$(PROJECT).dmp $(BUILDDIR)/$(PROJECT).list
+ $(BUILDDIR)/$(PROJECT).dmp $(BUILDDIR)/$(PROJECT).list
# Source files groups and paths
-SRC = $(CSRC)$(CPPSRC)
+SRC = $(CSRC)$(CPPSRC)
SRCPATHS = $(sort $(dir $(ASMXSRC)) $(dir $(ASMSRC)) $(dir $(SRC)))
# Various directories
@@ -84,7 +84,7 @@ COBJS = $(addprefix $(OBJDIR)/, $(notdir $(CSRC:.c=.o))) CPPOBJS = $(addprefix $(OBJDIR)/, $(notdir $(CPPSRC:.cpp=.o)))
ASMOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMSRC:.s=.o)))
ASMXOBJS = $(addprefix $(OBJDIR)/, $(notdir $(ASMXSRC:.S=.o)))
-OBJS = $(ASMXOBJS) $(ASMOBJS) $(COBJS) $(CPPOBJS)
+OBJS = $(ASMXOBJS) $(ASMOBJS) $(COBJS) $(CPPOBJS)
# Paths
IINCDIR = $(patsubst %,-I%,$(INCDIR) $(DINCDIR) $(UINCDIR))
@@ -92,14 +92,14 @@ LLIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR)) # Macros
DEFS = $(DDEFS) $(UDEFS)
-ADEFS = $(DADEFS) $(UADEFS)
+ADEFS = $(DADEFS) $(UADEFS)
# Libs
LIBS = $(DLIBS) $(ULIBS)
# Various settings
MCFLAGS = -mcpu=$(MCU)
-ODFLAGS = -x --syms
+ODFLAGS = -x --syms
ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
diff --git a/os/common/startup/e200/compilers/GHS/rules.mk b/os/common/startup/e200/compilers/GHS/rules.mk index ab8c54b4d..2aeffdbd9 100644 --- a/os/common/startup/e200/compilers/GHS/rules.mk +++ b/os/common/startup/e200/compilers/GHS/rules.mk @@ -11,27 +11,26 @@ CPPOPT = $(USE_CPPOPT) # Garbage collection
ifeq ($(USE_LINK_GC),yes)
- OPT += -ffunction-sections -fdata-sections -fno-common
- LDOPT := --gc-sections
-else
- LDOPT := --no-gc-sections
+ OPT += --no_commons
+ LDOPT := -delete
endif
# Linker extra options
ifneq ($(USE_LDOPT),)
- LDOPT := $(LDOPT),$(USE_LDOPT)
+ LDOPT := $(LDOPT) $(USE_LDOPT)
endif
# Link time optimizations
ifeq ($(USE_LTO),yes)
- OPT += -flto
+ OPT += -Owholeprogram
endif
# VLE option handling.
ifeq ($(USE_VLE),yes)
DDEFS += -DPPC_USE_VLE=1
DADEFS += -DPPC_USE_VLE=1
- MCU += -mvle
+ OPT += -vle
+ COPT += -vle
else
DDEFS += -DPPC_USE_VLE=0
DADEFS += -DPPC_USE_VLE=0
@@ -39,16 +38,16 @@ endif # Process stack size
ifeq ($(USE_PROCESS_STACKSIZE),)
- LDOPT := $(LDOPT),--defsym=__process_stack_size__=0x400
+ LDOPT := $(LDOPT) -C__process_stack_size__=0x400 #,--defsym=__process_stack_size__=0x400
else
- LDOPT := $(LDOPT),--defsym=__process_stack_size__=$(USE_PROCESS_STACKSIZE)
+ LDOPT := $(LDOPT) -C__process_stack_size__=$(USE_PROCESS_STACKSIZE) #,--defsym=__process_stack_size__=$(USE_PROCESS_STACKSIZE)
endif
# Exceptions stack size
ifeq ($(USE_EXCEPTIONS_STACKSIZE),)
- LDOPT := $(LDOPT),--defsym=__irq_stack_size__=0x400
+ LDOPT := $(LDOPT) -C__irq_stack_size__=0x400 #,--defsym=__irq_stack_size__=0x400
else
- LDOPT := $(LDOPT),--defsym=__irq_stack_size__=$(USE_EXCEPTIONS_STACKSIZE)
+ LDOPT := $(LDOPT) -C__irq_stack_size__=$(USE_EXCEPTIONS_STACKSIZE) #,--defsym=__irq_stack_size__=$(USE_EXCEPTIONS_STACKSIZE)
endif
# Output directory and files
@@ -69,7 +68,7 @@ endif OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \
$(BUILDDIR)/$(PROJECT).mot $(BUILDDIR)/$(PROJECT).bin \
- $(BUILDDIR)/$(PROJECT).dmp $(BUILDDIR)/$(PROJECT).list
+ $(BUILDDIR)/$(PROJECT).dmp
# Source files groups and paths
SRC = $(CSRC)$(CPPSRC)
@@ -98,19 +97,29 @@ ADEFS = $(DADEFS) $(UADEFS) LIBS = $(DLIBS) $(ULIBS)
# Various settings
-MCFLAGS = -mcpu=$(MCU)
-ODFLAGS = -x --syms
-ASFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS)
-ASXFLAGS = $(MCFLAGS) -Wa,-amhls=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS)
-CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
-CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) -Wa,-alms=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
-LDFLAGS = $(MCFLAGS) $(OPT) -nostartfiles $(LLIBDIR) -Wl,-Map=$(BUILDDIR)/$(PROJECT).map,--cref,--no-warn-mismatch,--library-path=$(RULESPATH)/ld,$(LDOPT),--script=$(LDSCRIPT)
+WARN = --incorrect_pragma_warnings --unknown_pragma_warnings --prototype_warnings --diag_error 236
+LIST = -list -tmp=$(OBJDIR)
+
+MCFLAGS = -cpu=$(MCU)
+
+ODFLAGS = -ysec -full
+
+ASFLAGS = $(MCFLAGS) $(OPT) $(LIST) -list=$(LSTDIR)/$(notdir $(<:.s=.lst)) $(ADEFS) $(WARN) -preprocess_assembly_files
+ASXFLAGS = $(MCFLAGS) $(OPT) $(LIST) -list=$(LSTDIR)/$(notdir $(<:.S=.lst)) $(ADEFS) $(WARN) -preprocess_assembly_files
+CFLAGS = $(MCFLAGS) $(OPT) $(COPT) $(CWARN) $(LIST) -list=$(LSTDIR)/$(notdir $(<:.c=.lst)) $(DEFS)
+CPPFLAGS = $(MCFLAGS) $(OPT) $(CPPOPT) $(CPPWARN) $(LIST) -list=$(LSTDIR)/$(notdir $(<:.cpp=.lst)) $(DEFS)
+
+LDFLAGS := $(MCFLAGS) $(OPT) -nostartfiles $(LLIBDIR)
+LDFLAGS += -map=$(BUILDDIR)/$(PROJECT).map
+LDFLAGS += -Mx
+LDFLAGS += $(LDOPT)
+LDFLAGS += $(LDSCRIPT)
# Generate dependency information
-ASFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
-ASXFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
-CFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
-CPPFLAGS += -MD -MP -MF $(DEPDIR)/$(@F).d
+ASFLAGS += -MD
+ASXFLAGS += -MD
+CFLAGS += -MD
+CPPFLAGS += -MD
# Paths where to search for sources
VPATH = $(SRCPATHS)
@@ -188,45 +197,37 @@ endif %.hex: %.elf $(LDSCRIPT)
ifeq ($(USE_VERBOSE_COMPILE),yes)
- $(HEX) $< $@
+ $(HEX) $< -o $@
else
@echo Creating $@
- @$(HEX) $< $@
+ @$(HEX) $< -o $@
endif
%.mot: %.elf $(LDSCRIPT)
ifeq ($(USE_VERBOSE_COMPILE),yes)
- $(MOT) $< $@
+ $(MOT) $< -o $@
else
@echo Creating $@
- @$(MOT) $< $@
+ @$(MOT) $< -o $@
endif
%.bin: %.elf $(LDSCRIPT)
ifeq ($(USE_VERBOSE_COMPILE),yes)
- $(BIN) $< $@
+ $(BIN) $< -o $@
else
@echo Creating $@
- @$(BIN) $< $@
+ @$(BIN) $< -o $@
endif
%.dmp: %.elf $(LDSCRIPT)
ifeq ($(USE_VERBOSE_COMPILE),yes)
$(OD) $(ODFLAGS) $< > $@
- $(SZ) $<
else
@echo Creating $@
@$(OD) $(ODFLAGS) $< > $@
@echo
- @$(SZ) $<
-endif
-
-%.list: %.elf $(LDSCRIPT)
-ifeq ($(USE_VERBOSE_COMPILE),yes)
- $(OD) -S $< > $@
-else
- @echo Creating $@
- @$(OD) -S $< > $@
+# @$(SZ) -addr -file -hex $<
+# @echo
@echo Done
endif
|