Skip to main content
Visitor II
April 10, 2009
Question

Arm or Thumb C Code?

  • April 10, 2009
  • 3 replies
  • 1035 views
Posted on April 10, 2009 at 09:30

Arm or Thumb C Code?

    This topic has been closed for replies.

    3 replies

    psantofeAuthor
    Visitor II
    April 9, 2009
    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

    Visitor II
    April 9, 2009
    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

    psantofeAuthor
    Visitor II
    April 10, 2009
    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