From 8ef38186faea3d9b5e6f0f1242f668cb7e7a3d52 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Jun 2000 19:57:02 +0000 Subject: Patch from John Cotton , Charles-Antoine Gauthier , and Darlene A. Stewart to add support for a number of very significant things: + BSPs for many variations on the Motorola MBX8xx board series + Cache Manager including initial support for m68040 and PowerPC + Rework of mpc8xx libcpu code so all mpc8xx CPUs now use same code base. + Rework of eth_comm BSP to utiltize above. John reports this works on the 821 and 860 --- make/compilers/gcc-target-default.cfg | 14 ++++++++++++-- make/custom/eth_comm.cfg | 33 +++++++++++++++++++++++++++++++-- make/custom/mvme167.cfg | 5 +++-- make/leaf.cfg | 4 +++- 4 files changed, 49 insertions(+), 7 deletions(-) (limited to 'make') diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg index fb5dfbad62..c0baabb6d4 100644 --- a/make/compilers/gcc-target-default.cfg +++ b/make/compilers/gcc-target-default.cfg @@ -88,17 +88,26 @@ endif # debug flag; CFLAGS_DEBUG_V+=-Wno-unused +CXXFLAGS_DEBUG_V+= ifeq ($(RTEMS_USE_GCC272),no) CFLAGS_DEBUG_V+=-qrtems_debug +CXXFLAGS_DEBUG_V+=-qrtems_debug endif +# when debugging, optimize flag: typically empty +# some compilers do allow optimization with their "-g" +CFLAGS_DEBUG_OPTIMIZE_V=-g +CXXFLAGS_DEBUG_OPTIMIZE_V=-g + # profile flag; use gprof(1) CFLAGS_PROFILE_V=-pg +CXXFLAGS_PROFILE_V=-pg ifndef AUTOMAKE # default is to optimize -CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V) +CFLAGS_OPTIMIZE =$(CFLAGS_OPTIMIZE_V) +CXXFLAGS_OPTIMIZE=$(CXXFLAGS_OPTIMIZE_V) endif # dynamic libraries @@ -106,7 +115,8 @@ endif #ASFLAGS_DYNAMIC_V= ifndef AUTOMAKE -CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE) +CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE) +CXXFLAGS += $(CXXFLAGS_OPTIMIZE) $(CXXFLAGS_DEBUG) $(CXXFLAGS_PROFILE) endif # List of library paths without -L diff --git a/make/custom/eth_comm.cfg b/make/custom/eth_comm.cfg index cde4b4ee30..901decbb77 100644 --- a/make/custom/eth_comm.cfg +++ b/make/custom/eth_comm.cfg @@ -7,7 +7,8 @@ include $(RTEMS_ROOT)/make/custom/default.cfg RTEMS_CPU=powerpc -RTEMS_CPU_MODEL=mpc860 +RTEMS_CPU_MODEL=mpc8xx +CPU_TYPE=860 # This is the actual bsp directory used during the build process. RTEMS_BSP_FAMILY=eth_comm @@ -25,17 +26,45 @@ CPU_DEFINES=-DPPC_VECTOR_FILE_BASE=0x00000000 # # RTEMS_DEBUG (RTEMS) # If defined, debug checks in RTEMS and support library code are enabled. +# +# PPC_VECTOR_FILE_BASE (PowerPC) +# This defines the base address of the exception table. +# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100 +# +# PPC_ABI (PowerPC) +# This defines the calling convention (Application Binary Interface) +# used in this configuration. EABI is the only one supported. +# This BSP was initially developed using the PowerOpen ABI. +# +# PPC_ASM (PowerPC) +# This defines the assembly language format used in this configuration. +# ELF is the only one supported. +# +# PPC_USE_SPRG (RTEMS PowerPC port) +# If defined (=1), then the PowerPC specific code in RTEMS will use some +# of the special purpose registers to slightly optimize interrupt +# response time. The use of these registers can conflict with +# other tools like debuggers. define make-target-options + @echo "#ifdef mpc$(CPU_TYPE)" >>$@ + @echo "#undef mpc$(CPU_TYPE)" >>$@ + @echo "#endif" >>$@ + @echo "#define mpc$(CPU_TYPE) 1" >>$@ + @echo >>$@ @echo "/* #define NDEBUG 1 */ " >>$@ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@ @echo "/* #define RTEMS_DEBUG 1 */" >>$@ + @echo "#define PPC_VECTOR_FILE_BASE 0x0000" >>$@ + @echo "#define PPC_ABI PPC_ABI_EABI" >>$@ + @echo "#define PPC_ASM PPC_ASM_ELF" >>$@ + @echo "#define PPC_USE_SPRG 1" >>$@ endef # This contains the compiler options necessary to select the CPU model # and (hopefully) optimize for it. # -CPU_CFLAGS = -mcpu=860 +CPU_CFLAGS = -mcpu=$(CPU_TYPE) # optimize flag: typically -0, could use -O4 or -fast # -O4 is ok for RTEMS diff --git a/make/custom/mvme167.cfg b/make/custom/mvme167.cfg index df47822c73..ade3c6f68f 100644 --- a/make/custom/mvme167.cfg +++ b/make/custom/mvme167.cfg @@ -86,14 +86,15 @@ ifeq ($(RTEMS_USE_GCC272),yes) define make-exe $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group - $(NM) -g -n $(basename $@).exe > $(basename $@).num + $(NM) -g -n $(basename $@).exe > $(basename $@).nm + $(STRIP) -o $(basename $@) $@ $(SIZE) $(basename $@).exe endef else define make-exe $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \ $(LINK_OBJS) $(LINK_LIBS) - $(NM) -g -n $@ > $(basename $@).nm + $(NM) -g -n $(basename $@).exe > $(basename $@).nm $(STRIP) -o $(basename $@) $@ $(SIZE) $(basename $@).exe endef diff --git a/make/leaf.cfg b/make/leaf.cfg index a4f29aa6ef..a1e3e1b1f3 100644 --- a/make/leaf.cfg +++ b/make/leaf.cfg @@ -49,13 +49,15 @@ ifndef AUTOMAKE debug: $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=o-debug" \ "CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \ - "CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)" \ + "CXXFLAGS_DEBUG=$(CXXFLAGS_DEBUG_V)" \ + "CFLAGS_OPTIMIZE=$(CFLAGS_DEBUG_OPTIMIZE_V)" \ "LDFLAGS_DEBUG=$(LDFLAGS_DEBUG_V)" $(TARGET_VA) profile: $(MAKE) -f $(MAKEFILE) \ MAKEFILE=$(MAKEFILE) "ARCH=o-profile" \ "CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \ + "CXXFLAGS_PROFILE=$(CXXFLAGS_PROFILE_V)" \ "LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA) endif -- cgit v1.2.3