From b3de027cc5dff8380422f2d2bf0bfb3c67b6acd6 Mon Sep 17 00:00:00 2001 From: Matteias Collet Date: Sat, 10 Dec 2022 23:14:07 +0000 Subject: [PATCH] add asm output --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 682c736..dd75734 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,9 @@ AS := powerpc-eabi-as ASFLAGS := -mregnames -mgekko OD := powerpc-eabi-objdump -ODFLAGS := -EB -D -b binary -m powerpc:750 -M gekko --full-content +ODFLAGS := -EB -D -b binary -m powerpc:750 -M gekko -a -p -h -F --full-content + +ODASMFLAGS := -EB -D -b binary -m powerpc:750 -M gekko --no-show-raw-insn --no-addresses LD := powerpc-eabi-ld LDFLAGS := --unresolved-symbols=ignore-in-object-files --enable-non-contiguous-regions -EB --nmagic @@ -24,6 +26,7 @@ OUT_MAP := main.map OUT_MAIN := main.out OUT_BIN := main.bin OUT_LST := main.lst +OUT_ASM := main.asm GMSE01 := 1 GMSJ01 := 2 @@ -38,7 +41,10 @@ OBJ_FILES := $(SRC_FILES:.c=.o) OBJS := main.o card.o blockCount := 7 -all: $(OUT_DIR)/$(OUT_BIN) $(OUT_DIR)/$(OUT_LST) +all: $(OUT_DIR)/$(OUT_BIN) $(OUT_DIR)/$(OUT_LST) $(OUT_DIR)/$(OUT_ASM) + +$(OUT_DIR)/$(OUT_ASM): $(OUT_DIR)/$(OUT_BIN) + $(OD) $(ODASMFLAGS) $(OUT_DIR)/$(OUT_BIN) | grep -Pe "^\t(?!Address)" | sed 's/^\t//' > $(OUT_DIR)/$(OUT_ASM) $(OUT_DIR)/$(OUT_LST): $(OUT_DIR)/$(OUT_BIN) $(OD) $(ODFLAGS) $(OUT_DIR)/$(OUT_BIN) > $(OUT_DIR)/$(OUT_LST)