diff options
Diffstat (limited to 'src/occ_405')
-rwxr-xr-x | src/occ_405/Makefile | 8 | ||||
-rw-r--r-- | src/occ_405/img_defs.mk | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/occ_405/Makefile b/src/occ_405/Makefile index 1a1cd63..809489c 100755 --- a/src/occ_405/Makefile +++ b/src/occ_405/Makefile @@ -70,6 +70,8 @@ LIB_DIRS = -L$(OBJDIR) \ -L$(OBJDIR)/cent #default target is to make a binary application image +all: $(PPETOOLS_OBJDIR)/ppetracepp $(OBJDIR)/$(IMAGE_NAME).bin $(OBJDIR)/$(IMAGE_NAME).dis + #This removes all unecessary headers from the ELF executable $(OBJDIR)/$(IMAGE_NAME).bin $(OBJDIR)/$(IMAGE_NAME).dis: $(OBJDIR)/$(IMAGE_NAME).out $(OBJCOPY) -O binary $< $(OBJDIR)/$(IMAGE_NAME).bin @@ -79,6 +81,12 @@ $(OBJDIR)/$(IMAGE_NAME).bin $(OBJDIR)/$(IMAGE_NAME).dis: $(OBJDIR)/$(IMAGE_NAME) $(OBJDIR)/$(IMAGE_NAME).out: $(TRACEPP_DIR)/tracepp $(LINK_OBJS) $(LINK_SCRIPT) $(LD) -e __ssx_boot -T$(LINK_SCRIPT) $(LDFLAGS) -Map $(OBJDIR)/$(IMAGE_NAME).map -Bstatic -o $(OBJDIR)/$(IMAGE_NAME).out $(LIB_DIRS) -lssx -locc -lppc405 -lcommon +$(PPETOOLS_OBJDIR)/ppetracepp: $(PPETOOLS_OBJDIR) + g++ -m32 -O3 -w -g -I$(PPETRACEPP_DIR)/ $(PPETRACEPP_DIR)/ppetracepp.C -o $(PPETOOLS_OBJDIR)/ppetracepp + +$(PPETOOLS_OBJDIR): + mkdir -p $(PPETOOLS_OBJDIR) + #pass the link command file through the C preprocessor to evaluate macros and remove comments #$(LINK_SCRIPT): linkocc.cmd $(LINK_SCRIPT): $(LINK_CMD_SCRIPT) diff --git a/src/occ_405/img_defs.mk b/src/occ_405/img_defs.mk index 3029079..bdcc2d9 100644 --- a/src/occ_405/img_defs.mk +++ b/src/occ_405/img_defs.mk @@ -113,20 +113,24 @@ ifndef PPETRACEPP_DIR export PPETRACEPP_DIR = $(abspath ../ppe/tools/ppetracepp) endif +ifndef PPETOOLS_OBJDIR +export PPETOOLS_OBJDIR = $(abspath ../obj/ppetools) +endif + ifndef TRACEPP_DIR export TRACEPP_DIR = $(abspath ../tracepp) endif CC_ASM = $(GCC-TOOL-PREFIX)gcc -TCC = $(PPETRACEPP_DIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc -THCC = $(TRACEPP_DIR)/tracepp $(GCC-TOOL-PREFIX)gcc +TCC = $(PPETOOLS_OBJDIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc +THCC = $(TRACEPP_DIR)/tracepp $(GCC-TOOL-PREFIX)gcc CC = $(GCC-TOOL-PREFIX)gcc AS = $(GCC-TOOL-PREFIX)as AR = $(GCC-TOOL-PREFIX)ar LD = $(GCC-TOOL-PREFIX)ld OBJDUMP = $(GCC-TOOL-PREFIX)objdump OBJCOPY = $(GCC-TOOL-PREFIX)objcopy -TCPP = $(PPETRACEPP_DIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc +TCPP = $(PPETOOLS_OBJDIR)/ppetracepp $(GCC-TOOL-PREFIX)gcc THASH = $(PPETRACEPP_DIR)/tracehash.pl CPP = $(GCC-TOOL-PREFIX)cpp @@ -154,8 +158,6 @@ ifeq "$(SSX_THREAD_SUPPORT)" "" SSX_THREAD_SUPPORT = 1 endif -# TODO: Enable this once we get MMU support working in simics -# Currently, turning on MMU support causes an SSX panic (in Simics) ifeq "$(PPC405_MMU_SUPPORT)" "" PPC405_MMU_SUPPORT = 1 endif |