Re: Mixed arm and thumb code

Posted by BogdanM on
URL: http://elua-development.15.s1.nabble.com/Mixed-arm-and-thumb-code-tp2537643p2537658.html



On Thu, Mar 26, 2009 at 12:28 PM, mpthompson <[hidden email]> wrote:

I'm starting to work with the Periodic Interval Timer on the AT91SAM7S and I believe I need to have the interrupt handlers be compiled as 32bit Arm instructions rather than 16bit Thumb instructions.  I'm not familiar with scons, but is there an easy way that I can pass custom options to specific C files to control whether the -mthumb option is passed?   Or, is the 'irqHandler' in the board_cstartup.s capable of calling the interrupt handler as thumb code?  As best I can tell this is not the case and any C code called from the 'irqHandler' must be 32 bit Arm code.

This questin haunted me for quite a while now, and the answer seems to be no, there's no easy way to do this in scons. I'm sure there's a harder way :), but I just don't know how to do it. Check out src/platform/at91sam7x/platform.c though, you'll find that your interrupts can work just fine in Thumb mode, provided that you write them properly (platform.c already has examples of timer interrupt and UART RX interrupt).

Best,
Bogdan
 
--
View this message in context: http://n2.nabble.com/Mixed-arm-and-thumb-code-tp2537643p2537643.html
Sent from the eLua Development mailing list archive at Nabble.com.

_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
Elua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev