SparkFun Forums 

Where electronics enthusiasts find answers.

Everything ARM and LPC
By fll-freak
I am trying to compile code that was originally for an Atmel AT91SAM7S256 using the IAR compiler. It is littered with __arm keywords in function definitions. My Goggling leads me to believe that the __arm tells the compiler to compile the routine in Thumb mode. The keyword is not recognized by the Yagarto (gcc) compiler. I have yet to find out if Yagarto has an equivalent and what it might be. My Goggling has not gotten me far. Anyone here know?
By UhClem
-mthumb will tell the compiler to use thumb mode. If you want to specify that on a function by function basis I think that there is an attribute. But if you mix thumb and regular functions you have to enable interworking which is disabled by default. Enabling it adds code.
By fll-freak
Sounds like my simplest solution is just to define __arm as nothing and just have the routines as ARM and not Thumb. A bit bigger code I would imagine, but unless I run into problems it will have to do.

By stevech
usually, that __arm directive is there to say that the section of code must compile to run in ARM mode, not thumb mode. Such as ISRs and some special functions.
By fll-freak
Talked to some one today at work who informed me of the same thing. Strange the developer felt it necessary to add the keyword to just about every routine and not just those called from and ISR.

Again, thanks for the help
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]