gp32rich
Never been accused of being subtle
So I've finally got around to grabbing DevKitArm_r8 (and Msys, and gpsdk.zip) and threw them all into a directory that now looks like this
I found a makefile from here and I fiddled with paths until I got a compile (it took a while to find the post that says 'put gpstart.o in your makefile' <_<
And I finally got a compile that works .. with GeePee32
When I try it on my gp32_console I just get a reset. :blink:
(Yes! I tried new batteries :rolleyes: Yes! Old compiles still work! B) )
What have I missed?
Should I have copied files from gamepark_sdk into devkitarm_r8?
Which crt0.o should I be pointing at (and where is it referenced?)
At the moment everything is pretty much vanilla
Here's the makefile
Here's the include $(GPSDK)/gp32.mk file (It's how DKAdv used to do it and it makes the makefile look neat )
Any help would be very much appreciated and will save the little hair I have left :unsure:
And I might just get out of dev-heck and around to updating some hanging projects too ^_^
Cheers!
Rich
Code:
c:\devkitarm
+devkitarm_r8
|+arm-elf
|+bin
|+include
|+info
|+lib
|+libexec
|+man
+gamepark_sdk
|+include
|+lib
+msys-1.0
I found a makefile from here and I fiddled with paths until I got a compile (it took a while to find the post that says 'put gpstart.o in your makefile' <_<
And I finally got a compile that works .. with GeePee32
When I try it on my gp32_console I just get a reset. :blink:
(Yes! I tried new batteries :rolleyes: Yes! Old compiles still work! B) )
What have I missed?
Should I have copied files from gamepark_sdk into devkitarm_r8?
Which crt0.o should I be pointing at (and where is it referenced?)
At the moment everything is pretty much vanilla
Here's the makefile
Code:
# Core Makefile for GP32 development using GCC
# Written 2002 by Christian Nowak <chnowak@web.de>
# Patched 2004 by DJWillis for GamePark SDK project
# compatability for newer GCC's using Patched GameParkSDK
# Version 2.0
# gpSDK root directory
export GPSDK = c:/devkitARM
#/cygdrive/c/gpTC/sdk/gp
# devkitadv base dir
export CCBASE=c:/devkitarm
# User options passed to the compiler
export CUSER=-DLITTLE_ENDIAN -DGP32
#include $(CCBASE)/gp32_gpsdk.mk
include $(GPSDK)/gp32.mk
# For creating .fxe
TARGET = MyFirst
APPNAME = My First Compile with DevKitArm!
AUTHOR = Rich
FXETOOL = b2fxec
.SFILES =
.CFILES = MyFirst.c
OBJS = $(.SFILES:.s=.o) $(.CFILES:.c=.o)
# Outputs
ELF = $(TARGET).elf
MAPFILE = $(TARGET).map
BIN = $(TARGET).gxb
FXE = $(TARGET).fxe
.PHONY: all clean depend
all: $(FXE)
clean:
rm -f $(OBJS) $(MAPFILE) $(BIN) $(ELF) $(FXE)
$(ELF): $(OBJS) $(GPSDK)/gamepark_sdk/gpstart.o
$(LINK)
$(BIN): $(ELF)
$(OBJCOPY) -O binary $< $@
$(FXE): $(BIN)
$(FXETOOL) -b $(TARGET).bmp -f -a "$(AUTHOR)" -t "$(APPNAME)" $< $@
$(.CFILES):
Here's the include $(GPSDK)/gp32.mk file (It's how DKAdv used to do it and it makes the makefile look neat )
Code:
# Core Makefile for GP32 C development using GCC 3.x.x
# Written 2002 by Christian Nowak <chnowak@web.de>
# Rewritten 2004 by DJWillis <gp32@distant-earth.co.uk> for
# GamePark SDK project compatability for newer GCC's using
# GPSDK (non-interworking, correctly marked libs).
# Version 2.5
# GCC Tool-chain
CC = arm-elf-gcc
CXX = arm-elf-g++
LD = arm-elf-gcc
AS = arm-elf-as
OBJCOPY = arm-elf-objcopy
CFLAGS = $(CUSER) \
$(OPT_LEVEL) \
-marm \
-march=armv4t \
-mtune=arm920t \
-mapcs \
-fomit-frame-pointer \
-finline-functions \
-fshort-enums \
-ffast-math \
-fshort-double \
-mstructure-size-boundary=8 \
-mno-thumb-interwork \
-I$(GPSDK)/gamepark_sdk/include \
-Wno-multichar
CPPFLAGS = $(CUSER) \
$(OPT_LEVEL) \
-marm \
-march=armv4t \
-mtune=arm920t \
-mapcs \
-fomit-frame-pointer \
-finline-functions \
-fshort-enums \
-ffast-math \
-fshort-double \
-mstructure-size-boundary=8 \
-mno-thumb-interwork \
-I$(GPSDK)/gamepark_sdk/include \
-Wno-multichar
LIBDIRS = -L$(GPSDK)/gamepark_sdk/lib
LDSPECS = -specs=$(GPSDK)/gamepark_sdk/gp32_gpsdk.specs
LDFLAGS = $(LDSPECS) \
-Wl,-Map,$(MAPFILE) \
$(LIBDIRS) \
$(GP_LIBS) \
$(LIBS_USER)
GP_LIBS = -lgpgraphic -lgpgraphic16 -lgpmem -lgpos -lgpstdlib -lgpstdio -lgpsound -lgpg_ex01 -lgpfont -lgpfont16
# Startup GP32 Objects
GP_START = $(GPSDK)/gamepark_sdk/gpstartup.o
GP_FILEIO = $(GPSDK)/sdk/extra_sdk/gp32_fileio/gp32_fileio.o
# Uncomment the link(s) below to use the default SDK startup in preferance to custom startup.
GP_OBJS = $(GP_START)
# $(GP_FILEIO)
LINK = $(LD) $(STRIP_DEBUG) -o $@ $^ $(LDFLAGS)
# Implicit Rules
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.cpp
$(CXX) $(CPPFLAGS) -c $< -o $@
%.gxb: %.elf
$(OBJCOPY) -O binary $< $@
%.o: %.s
$(AS) -o $@ $<
Any help would be very much appreciated and will save the little hair I have left :unsure:
And I might just get out of dev-heck and around to updating some hanging projects too ^_^
Cheers!
Rich