diff --git a/makefile.gen b/makefile.gen index 3f7b84e5..11673e20 100644 --- a/makefile.gen +++ b/makefile.gen @@ -76,7 +76,8 @@ release: CFLAGS= $(FLAGS) release: AFLAGS= $(FLAGS) release: LIBMD= $(LIB)/libmd.a release: $(OUT)/rom.bin $(OUT)/symbol.txt -.PHONY: release +release: padROM +.PHONY: release padROM #release: $(info $$var is [${SRC_C}]) @@ -86,7 +87,8 @@ debug: AFLAGS= $(FLAGS) debug: LIBMD= $(LIB)/libmd_debug.a debug: $(OUT)/rom.bin $(OUT)/rom.out $(OUT)/symbol.txt debug: injectSymbolsInROM -.PHONY: debug injectSymbolsInROM +debug: padROM +.PHONY: debug injectSymbolsInROM padROM asm: FLAGS= $(DEFAULT_FLAGS) -O3 -fuse-linker-plugin -fno-web -fno-gcse -fomit-frame-pointer -S asm: CFLAGS= $(FLAGS) @@ -159,13 +161,14 @@ cleanDebug: cleandebug cleanAsm: cleanasm .PHONY: cleanRelease cleanDebug cleanAsm +padROM: $(OUT)/rom.bin + $(SIZEBND) $(OUT)/rom.bin -sizealign 131072 -checksum injectSymbolsInROM: $(OUT)/rom.bin $(OUT)/rom.out $(OUT)/symbol.txt $(CONVSYM) $(OUT)/symbol.txt $(OUT)/rom.bin -in txt -inopt "/fmt='%X %*[TtBbCcDd] %511s' /offsetFirst+" -range 0 FFFFFF -a -ref @MDDBG__SymbolDataPtr $(OUT)/rom.bin: $(OUT)/rom.out $(OUT)/symbol.txt $(OBJCPY) -O binary $(OUT)/rom.out $(OUT)/rom.bin - $(SIZEBND) $(OUT)/rom.bin -sizealign 131072 -checksum $(OUT)/symbol.txt: $(OUT)/rom.out $(NM) $(LTO_PLUGIN) -nl $(OUT)/rom.out > $(OUT)/symbol.txt