GP32 Chatboard Test Code


vishwats

Still Fresh
Joined
Dec 4, 2003
Messages
51
Hi,
does any one wrote their own Chatboard programs using Mr Spiv's drivers ?

Specially using DevKitAdvance..

If so can you please mail the entire project to me ? That will help me a lot in understanding how to use it.

Thanks & regards
-vishwa
 
*bump*
I guess I just need the correct makefile under Windows. At first I got errors for the // comments. I changed the compiler to g++ instead of gcc. That fixed that problem.

Now I get error compile kbdrv.c, it says it has error at line 194 (The assembler code). Do I need some switch to compile inine assembly ?

Thanks for the help in advance

-vishwa

Here is my Makefile

Code:
# devkitadv base dir
export CCBASE=c:/devkitadv
# User options passed to the compiler
export CUSER=-DLITTLE_ENDIAN -DGP32 -asm
include $(CCBASE)/gp32.mk
#------------------------------

SRCS = main.c kbdio.c kbdrv.c
EXE = Test
OBJS = $(SRCS:.c=.o) 


all: $(EXE).gxb

$(EXE).gxb: $(EXE).elf

$(EXE).elf:  $(OBJS) 
	$(LINK)

main.o: main.c

$(OBJS) : $(SRCS)

clean:
	rm -f $(OBJS) $(EXE).elf $(EXE).gxb main.o
 
One more update,
I guess I had -ansi in the compiler directives hence, it was not compiling the // comments.

I removed it and there are no problems with the // comments. The compiler is not gcc (not g++)

I still get errors at installIRQ and releaseIRQ functions,

parse error before token [

can some one please help ?

Thanks
-vishwa
 
*BUMP*

I guess no one wants to help me here :( . I even tried to compile under minigp32 setup , I get the same error

This is what I get in the error window
C:\minigp32\here your projects\kbdtest>make
gcc -I /minigp32/include/gpinclude -c -o kbdrv.o kbdrv.c
kbdrv.c: In function `installIRQ':
kbdrv.c:194: parse error before '[' token
kbdrv.c: In function `removeIRQ':
kbdrv.c:209: parse error before '[' token
kbdrv.c: In function `resolveKeyMapping':
kbdrv.c:564: warning: assignment makes pointer from integer without a cast
kbdrv.c:566: warning: assignment makes pointer from integer without a cast
make: *** [kbdrv.o] Error 1

C:\minigp32\here your projects\kbdtest>
 
I would suggest upgrading your gcc tool chain.. It is just inline asm syntax problems..
Try like this:

void installIRQ( int num, void (*irq)(void) ) {
asm volatile(""
"stmdb sp!,{lr} \n"
"mov r0,%0 \n"
"mov r1,%1 \n"
"swi #0x09 \n"
"ldmia sp!,{lr}"
:
: "r"(num), "r"(irq)
: "r0","r1");
}
 
Thanks,
that fixed the problem with installIRQ.
BTW I stink at inline asm,

how do I upgrade my gcc toolchain ? is there a guide to do so (with devkitadv) ?

Kindly let me know, also, can you please paste the code to fix releaseIRQ function also ?

thanks in advance
-vishwa
 
Back
Top