GP32 The Devkitarm Blues.....


Scott

Still Fresh
Joined
Jun 22, 2004
Messages
84
Age
34
Location
Florida, USA
Website
www.subquantumsoftware.com
ok, this is starting to get me annoyed.

I can build something as complex as wonderboi, but I cant build something like this:

#include <gpstdlib.h>
#include <gpstdio.h>
#include <gpgraphic.h>
#include <gpmain.h>
#include <gpfont.h>


void GpMain(void *arg)
{


}


Or I get this:

Code:
rm -f  gpmain.o Game.map Game.gxb Game.elf Game.fxe
arm-elf-gcc -marm -march=armv4t -mapcs -O3 -fomit-frame-pointer -finline-functions -fshort-enums -ffast-math -fshort-double -mstructure-size-boundary=32 -mno-thumb-interwork -Wno-multichar -I/c/gp32/devkitARM/include -I. -I./zlib   -c -o gpmain.o gpmain.c
arm-elf-gcc -o  Game.elf gpmain.o -specs=gp32_gpsdk.specs -Wl,-Map,Game.map -L/c/gp32/devkitARM/lib -lgpgraphic -lgpmem -lgpos -lgpstdlib -lgpstdio -lgpsound -lgpg_ex01 -lgpfont  -lm -lc  
c:/gp32/devkitARM/bin/../lib/gcc/arm-elf/3.4.1/../../../../arm-elf/lib/gp32_gpsdk_crt0.o(.text+0x244): In function `CopyZIData':
: undefined reference to `HEAPSTART'
c:/gp32/devkitARM/bin/../lib/gcc/arm-elf/3.4.1/../../../../arm-elf/lib/gp32_gpsdk_crt0.o(.text+0x248): In function `CopyZIData':
: undefined reference to `HEAPEND'
c:/gp32/devkitARM/bin/../lib/gcc/arm-elf/3.4.1/../../../../arm-elf/lib/gp32_gpsdk_crt0.o(.text+0x24c): In function `CopyZIData':
: undefined reference to `main'
c:/gp32/devkitARM/lib\libgpstdlib.a(gpstdlib.o)(.text+0x180): In function `_system_timer_init':
: undefined reference to `_GPOSTickISR'
c:/gp32/devkitARM/lib\libgpstdlib.a(asm_gpstdlib.o)(.text+0xd0): In function `GpGraphicModeSet':
: undefined reference to `_gp_os_res_lock'
c:/gp32/devkitARM/lib\libgpstdlib.a(asm_gpstdlib.o)(.text+0xf0): In function `GpGraphicModeSet':
: undefined reference to `_gp_os_res_unlock'
c:/gp32/devkitARM/lib\libgpstdlib.a(asm_gpstdlib.o)(.text+0x194): In function `GpLcdLock':
: undefined reference to `_gp_os_res_lock'
c:/gp32/devkitARM/lib\libgpstdlib.a(asm_gpstdlib.o)(.text+0x1b4): In function `GpLcdUnlock':
: undefined reference to `_gp_os_res_unlock'
collect2: ld returned 1 exit status
make: *** [Game.elf] Error 1



and it happens even when I put the right stuff in the main funtion.

Heres my makefile contents:

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

# File Name
TARGET  =	Game
# Full Application Name
APPNAME  =	Some Game
# Author
AUTHOR  =	Scott
# FXE Tool (b2fxe or b2fxec)
FXETOOL  =	b2fxec

# gpSDK root directory
GPSDK  =	/c/gp32/devkitARM
    #/cygdrive/c/gpTC/sdk/gp
    
# GCC Tool-chain
CC  	=	arm-elf-gcc
CXX  	=	arm-elf-g++
LD  	=	arm-elf-gcc
AS  	=	arm-elf-as
OBJCOPY  	=	arm-elf-objcopy
 
.SFILES  	=  
 
.CFILES  	=	gpmain.c

OBJS  	=	$(.SFILES:.s=.o) $(.CFILES:.c=.o)
 
CFLAGS  	=	-marm \
    -march=armv4t \
          	-mapcs \
          	-O3 \
          	-fomit-frame-pointer \
          	-finline-functions \
          	-fshort-enums \
          	-ffast-math \
          	-fshort-double \
          	-mstructure-size-boundary=32 \
          	-mno-thumb-interwork \
          	-Wno-multichar \
    -I$(GPSDK)/include \
    -I. \
    -I./zlib
 
LIBDIRS  	=	-L$(GPSDK)/lib
GP_LIBS  	=	-lgpgraphic -lgpmem -lgpos -lgpstdlib -lgpstdio -lgpsound -lgpg_ex01 -lgpfont 
LIBS  	=	-lm -lc #-lz 
 
LDFLAGS  	=	$(LDSPECS) \
    -Wl,-Map,$(MAPFILE) \
    $(LIBDIRS) \
    $(GP_LIBS) \
    $(LIBS)
 
LDSPECS  	=	-specs=gp32_gpsdk.specs
 
LINK  	=	$(LD) -o $(GP_OBJS) $@ $^ $(LDFLAGS) 
 
# 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)
    $(LINK)
 
$(BIN): $(ELF)
    $(OBJCOPY) -O binary $< $@
 
$(FXE): $(BIN)
    $(FXETOOL) -b $(TARGET).bmp -f -a "$(AUTHOR)" -t "$(APPNAME)" $< $@


Everything looks right to me.

Someone please help!

And if you could, could you just make some hello world code example for devkitarm? All i can find is stuff for Mr. mirko's stuff. Thanks!
 
Back
Top