add asm output

This commit is contained in:
Matteias Collet 2022-12-10 23:14:07 +00:00 committed by GitHub
parent d3da0a3213
commit b3de027cc5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)