GP32 Help Compiling Ljohngp


A600

Certified Guru
Joined
Mar 9, 2003
Messages
368
I have tried to compile ljohnGP with devkitadv and devkitarm but I have the same problem with assembler code. For example:

__asm {nop};

gives the error: parse error before '{' token

if I change it to __asm ("nop"); it compiles fine but there is a lot of assembler code and it would be a pain to change it. Is there a better solution?.
 
EvilDragon posted on Aug 6 2005 at 11:12 PM said:
Even WordPad supports "Search and Replace"...

It isn't so easy :) Anyway I used Ultraedit and its powerful reg-exp to change the strings:

search string: _asm {^(*^)}
replace string: _asm ("^1")

but now I have a big problem: assembler files can't be compiled with devkit but they compile fine with ADS and C files compile fine with devkit but have lots of errors with ADS. Objs generated by ADS can't be linked with devkit so I have reached a dead end :(

Any suggestions?
 
Last edited by a moderator:
A600 posted on Aug 6 2005 at 10:37 PM said:
but now I have a big problem: assembler files can't be compiled with devkit but they compile fine with ADS and C files compile fine with devkit but have lots of errors with ADS. Objs generated by ADS can't be linked with devkit so I have reached a dead end :(

Any suggestions?

Just convert the assembler files to GCC compatible ones, it's not so difficult.
 
Last edited by a moderator:
Changing it to

__asm ( "foo" )

is just changing it to a function call __asm with string "foo" -- likely you'll get a link error for function __asm

Perhaps the format has changed from __asm to _asm or any number of things; I forget.. too many compilers and they all do it differently. It did change from gcc 2 to 3 to 4 I think, so look her up.

An Emacs macro would do all that above easy :)

jeff
 
Try this format i.e.:
__asm ("nop;nop;nop;nop;");

In DevKitARM i use this:
__asm__ __volatile__ ("nop;nop;nop;nop;");
 
Back
Top