GP32 Easiest Way to Assemble for GP32


Dave18

Member
Joined
Mar 16, 2003
Messages
352
Age
50
I've decided to try and play around with assembly language for the GP32. However it seems that finding an easy to use assembler is more difficult than writing the code :(
I did some assembly coding on the Amiga and used Devpac which was nice and easy.

1) Typed the code
2) Clicked 'Assemble'
3) An executable was produced.

I'm looking for something as easy to use to assemble executables for GP32 (something like Goldroad for the GBA). If nothing quite as easy to use exists then a quick tutorial on how to assemble an executable for the GP32 would be most appreciated.

Thanks for any help.

Dave
:)
 
generalnmx

Thanks for the reply. I use devkitadv and tried to compile the following bit of code.

void GpMain (void * arg)
{
_asm volatile
{
mov r0,r1
}
}

but I get the following error messages.

c:/devkitadv/bin/arm-agb-elf-gcc -DLITTLE_ENDIAN -DGP32 -mcpu=arm9tdmi -mtune=arm9tdmi -fexpensive-optimizations -mapcs -O3 -mstructure-size-boundary=8 -mno-thumb-interwork -fno-builtin -fno-common -fno-exceptions -finline-functions -fomit-frame-pointer -fshort-enums -ffast-math -fshort-double -fallow-single-precision -ffreestanding -Ic:/devkitadv/arm-agb-elf/include/gp32 -Ic:/devkitadv/arm-agb-elf/include -c GpMain.c
GpMain.c: In function `GpMain':
GpMain.c:6: `_asm' undeclared (first use in this function)
GpMain.c:6: (Each undeclared identifier is reported only once
GpMain.c:6: for each function it appears in.)
GpMain.c:6: parse error before "volatile"
make: *** [GpMain.o] Error 1
Tool returned code: 2

Do I need to adjust the makefile (I've never quite got to grips with all the info in it!).

Thanks for any further help.

Dave
:)
 
Sorry, my syntax was incorrect - remove the underscore ( _ ).

Here's an excerpt from mr. spiv's keyboard driver:

Code:
void installIRQ( int num, void (*irq)(void) ) {
	asm volatile(""
  "stmdb	sp!,{lr}	\n"
  "mov	r0,%[_num]	\n"
  "mov	r1,%[_irq]	\n"
  "swi	#0x09  \n"
  "ldmia	sp!,{lr}"
  : 
  : [_num] "r"(num), [_irq] "r"(irq)
  : "r0","r1");
}
 
Thanks for all the help.

Took the underscore out and it worked fine. :)

Now all that's left is the small task of learning ARM assembler! :p

Thanks

Dave
 
Back
Top