gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > how to compile C to ARM code??

#80530 - aik6980 - Sun Apr 23, 2006 6:08 am

I've read interupt tutorial in TONC. he mentioned when coding the ISR should be done in ARM code

could I code it in C, and config the GCC to compile in ARM code?


now i use -mthumb -mthumb-interwork

#80559 - Cearn - Sun Apr 23, 2006 1:56 pm

Lose the '-mthumb' flag, that's what's making it compile to thumb code. If you want to be explicit about it, use '-marm' instead. Adding '-mlong-calls'
is also a good idea if you expect to call other functions from the iwram routines.

So that's '-marm -mthumb-interwork -mlong-calls', plus all the rest of the compiler flags you'd usually have for optimisations, warnings, etc.

#80562 - aik6980 - Sun Apr 23, 2006 2:21 pm

cheers

i'll try

#80601 - wintermute - Sun Apr 23, 2006 6:18 pm

See this topic also

http://forum.gbadev.org/viewtopic.php?t=9325
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog