I used all stuff from saturnorbit with no success. ip.bin,makefile,libs from saturn orbit i kept only in the sources a init system and a slprint and it still doesn't work. Objects file
| | | # source_program SRCS = \ main.c \ C:/SaturnOrbit/COMMON/cinit.o SYSOBJS = $(SGLLDR)/sglarea.o OBJS = $(SRCS:.c=.o) LIBS =C:/SaturnOrbit/SGL_302j/LIB_ELF/LIBSGL.A #C:/SaturnOrbit/SGL _302j/LIB_ELF/LIBCD. A #L:/saturn/dev/phoe nix/ELF/LIBCD.A\ #L:/saturn/dev/phoe nix/ELF/LIBSGL.A\ |
Makefile
| | | # # SEGA SATURN Graphic library make file for GNU # # slightly modified for ISO building, COFF toolchain # specify on command line # OBJFMT = coff OBJFMT = elf # macro CC = sh-$(OBJFMT)-gcc CONV = sh-$(OBJFMT)-objcopy RM = rm # directory SGLDIR = C:/SaturnOrbit/SGL_302j SGLIDR = $(SGLDIR)/inc SGLLDR = $(SGLDIR)/lib_elf CMNDIR = C:/SaturnOrbit/COMMON OBJECTS = ./objects # option #CCFLAGS = -O2 -m2 -g -c -I$(SGLIDR) CCFLAGS = -O1 -m2 -c -I$(SGLIDR) # -m2 must be specified in LDFLAGS so the linker will search the SH2 lib dirs # Specify path of libsgl.a by using "-L" option LDFLAGS = -m2 -L$(SGLLDR) -Xlinker -T$(LDFILE) -Xlinker -Map \ -Xlinker $(MPFILE) -Xlinker -e -Xlinker ___Start -nostartfiles -LL:/GNUSH802-ELF/sh-elf/sh-elf/lib/m2/libc.a DFLAGS = include $(OBJECTS) TARGET = root/sl.coff TARGET1 = root/sl.bin MPFILE = $(TARGET:.coff=.maps) IPFILE = $(CMNDIR)/IP.BIN LDFILE = $(CMNDIR)/SL.lnk MAKEFILE = makefile all: $(TARGET) $(TARGET1) $(TARGET2) # Use gcc to link so it will automagically find correct libs directory $(TARGET) : $(SYSOBJS) $(OBJS) $(MAKEFILE) $(LDFILE) #$(OBJECTS) $(CC) $(LDFLAGS) $(SYSOBJS) $(OBJS) $(LIBS) -o $@ $(TARGET1) : $(SYSOBJS) $(OBJS) $(MAKEFILE) $(LDFILE) $(CONV) -O binary $(TARGET) $(TARGET1) .SUFFIXES: .asm .c.o: $(CC) $< $(DFLAGS) $(CCFLAGS) $(_CCFLAGS) -o $@ |
EDIT : fixed by restoring cinit.o and restoring -Xlinker --format=coff-sh -Xlinker, but why this for ELF ? I never use that with SBL. |