From c64ca6b98f04f417fb069089558e3bb8fd04a120 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 22 Sep 2017 07:12:38 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10665 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/SPC5/RT-SPC56EC-EVB/Makefile_ghs | 40 ++++++++----------- os/common/startup/e200/compilers/GHS/rules.mk | 8 ++-- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/demos/SPC5/RT-SPC56EC-EVB/Makefile_ghs b/demos/SPC5/RT-SPC56EC-EVB/Makefile_ghs index 1cfe85049..36dcd7a94 100644 --- a/demos/SPC5/RT-SPC56EC-EVB/Makefile_ghs +++ b/demos/SPC5/RT-SPC56EC-EVB/Makefile_ghs @@ -5,7 +5,7 @@ # Compiler options here. ifeq ($(USE_OPT),) - USE_OPT = -O2 -ggdb -fomit-frame-pointer -falign-functions=16 + USE_OPT = -c99 -Ospeed -Onounroll endif # C specific options here (added to USE_OPT). @@ -133,33 +133,25 @@ INCDIR = $(CHIBIOS)/os/license \ # Compiler settings # -#MCU = e200zx -meabi -msdata=none -mnew-mnemonics -mregnames # HighTec -MCU = e200z4 -meabi -msdata=none -mregnames # Free GCC +MCU = ppc564xcz0 -#TRGT = ppc-vle- -#TRGT = powerpc-eabivle- -TRGT = ppc-freevle-eabi- -CC = $(TRGT)gcc -CPPC = $(TRGT)g++ -# Enable loading with g++ only if you need C++ runtime support. -# NOTE: You can use C++ even without C++ support if you are careful. C++ -# runtime support makes code size explode. -LD = $(TRGT)gcc -#LD = $(TRGT)g++ -CP = $(TRGT)objcopy -AS = $(TRGT)gcc -x assembler-with-cpp -AR = $(TRGT)ar -OD = $(TRGT)objdump -SZ = $(TRGT)size -HEX = $(CP) -O ihex -MOT = $(CP) -O srec -BIN = $(CP) -O binary +TRGT = +CC = $(TRGT)ccppc +CPPC = $(TRGT)cxppc +LD = $(TRGT)cxppc +AS = $(TRGT)ccppc +AR = $(TRGT)ax +OD = $(TRGT)gdump +SZ = $(TRGT)gfunsize +HEX = gsrec -hex386 +MOT = gsrec +BIN = gmemfile # Define C warning options here -CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes +CWARN = --ghstd=last # Define C++ warning options here -CPPWARN = -Wall -Wextra -Wundef +CPPWARN = --ghstd=last # # Compiler settings @@ -188,5 +180,5 @@ ULIBS = # End of user defines ############################################################################## -RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GCC +RULESPATH = $(CHIBIOS)/os/common/startup/e200/compilers/GHS include $(RULESPATH)/rules.mk diff --git a/os/common/startup/e200/compilers/GHS/rules.mk b/os/common/startup/e200/compilers/GHS/rules.mk index 2aeffdbd9..6fd45a430 100644 --- a/os/common/startup/e200/compilers/GHS/rules.mk +++ b/os/common/startup/e200/compilers/GHS/rules.mk @@ -71,7 +71,7 @@ OUTFILES = $(BUILDDIR)/$(PROJECT).elf $(BUILDDIR)/$(PROJECT).hex \ $(BUILDDIR)/$(PROJECT).dmp # Source files groups and paths -SRC = $(CSRC)$(CPPSRC) +SRC = $(CSRC)$(CPPSRC) SRCPATHS = $(sort $(dir $(ASMXSRC)) $(dir $(ASMSRC)) $(dir $(SRC))) # Various directories @@ -83,7 +83,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)) @@ -91,7 +91,7 @@ LLIBDIR = $(patsubst %,-L%,$(DLIBDIR) $(ULIBDIR)) # Macros DEFS = $(DDEFS) $(UDEFS) -ADEFS = $(DADEFS) $(UADEFS) +ADEFS = $(DADEFS) $(UADEFS) # Libs LIBS = $(DLIBS) $(ULIBS) @@ -102,7 +102,7 @@ LIST = -list -tmp=$(OBJDIR) MCFLAGS = -cpu=$(MCU) -ODFLAGS = -ysec -full +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