add binary padding
This commit is contained in:
parent
b3de027cc5
commit
638d27b425
3 changed files with 7 additions and 8 deletions
5
Makefile
5
Makefile
|
@ -6,14 +6,13 @@ ASFLAGS := -mregnames -mgekko
|
|||
|
||||
OD := powerpc-eabi-objdump
|
||||
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
|
||||
|
||||
OBJCOPY := powerpc-eabi-objcopy
|
||||
PYTHON := python3
|
||||
OBJCOPYFLAGS := -O binary --add-gnu-debuglink=sms.ld --gap-fill 0x00 --pad-to 0x81800000
|
||||
|
||||
SRC_DIR := source
|
||||
INC_DIR := include
|
||||
|
@ -50,7 +49,7 @@ $(OUT_DIR)/$(OUT_LST): $(OUT_DIR)/$(OUT_BIN)
|
|||
$(OD) $(ODFLAGS) $(OUT_DIR)/$(OUT_BIN) > $(OUT_DIR)/$(OUT_LST)
|
||||
|
||||
$(OUT_DIR)/$(OUT_BIN): $(OUT_DIR)/$(OUT_MAIN)
|
||||
$(OBJCOPY) -O binary $< $@
|
||||
$(OBJCOPY) $(OBJCOPYFLAGS) $< $@
|
||||
|
||||
$(OUT_DIR)/$(OUT_MAIN): $(OBJ_FILES) $(LD_FILE) $(OUT_DIR)
|
||||
$(LD) $(LDFLAGS) -o $@ -T $(LD_FILE) -Map $(OUT_DIR)/$(OUT_MAP) $(OBJ_FILES)
|
||||
|
|
|
@ -21,13 +21,13 @@ typedef struct CARDFileInfo
|
|||
u16 iBlock;
|
||||
} CARDFileInfo;
|
||||
|
||||
// typedef void (*CARDCallback)(s32 chan, s32 result);
|
||||
|
||||
s32 CARDOpen(s32 slot, const char *fileName, CARDFileInfo *fileInfo);
|
||||
s32 CARDRead(CARDFileInfo *fileInfo, void *addr, s32 length, s32 offset);
|
||||
s32 CARDClose(CARDFileInfo *fileInfo);
|
||||
// s32 CARDProbeEx(s32 chan, s32 *memSize, s32 *sectorSize);
|
||||
// s32 CARDMount(s32 chan, void *workArea, CARDCallback detachCallback);
|
||||
s32 CARDUnmount(s32 chan);
|
||||
|
||||
// typedef void (*CARDCallback)(s32 chan, s32 result);
|
||||
// s32 CARDProbeEx(s32 chan, s32 *memSize, s32 *sectorSize);
|
||||
// s32 CARDMount(s32 chan, void *workArea, CARDCallback detachCallback);
|
||||
|
||||
#endif
|
2
sms.ld
2
sms.ld
|
@ -1,5 +1,5 @@
|
|||
SECTIONS {
|
||||
. = 0x80000000; /* TODO: Determine Address */
|
||||
. = 0x817FF000; /* TODO: Determine Best Address */
|
||||
.text : { *(.text) }
|
||||
.rodata : { *(.rodata) }
|
||||
.data : { *(.data) }
|
||||
|
|
Loading…
Reference in a new issue