cancel
Showing results for 
Search instead for 
Did you mean: 

Arm or Thumb C Code?

psantofe
Associate II
Posted on April 10, 2009 at 09:30

Arm or Thumb C Code?

3 REPLIES 3
psantofe
Associate II
Posted on April 09, 2009 at 11:15

I'm working on a STR730-ks eval board by IAR SYSTEMS. IAR Embedded Workbench IDE rel. 5.30.2.

I'm using the example made by IAR.

My question is: all examples that use interrupts work setting ARM C Code mode only (never in Thumb).

Which is the reason of this?

Is it possible to set Thumb C Code instead of ARM in application where interrupt are used)?

How? Where do I must set instructions in order to do this?

Thanks

Paolo

sjo
Associate II
Posted on April 09, 2009 at 15:10

arm7/9 always enter isr's in arm mode.

you can switch to thumb mode once you are in the handler.

This is why many people use asm to wrap a 'c' interrupt handler.

Cheers

sjo

psantofe
Associate II
Posted on April 10, 2009 at 09:30

Thank you sjo!

I found solution to my problem enabling ''Generate interwork code'' inside project options of IDE in C/C++ Compiler section. This allows me to mix my Thumb code with Arm Interrupt service routine.

Cheers

Paolo