[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RTEMS and ARM/Thumb




Jay Monkman wrote:
> 
> On Mon, Feb 10, 2003 at 10:13:59AM -0600, Joel Sherrill wrote:
> > Does anyone out there have experience using the Thumb instructions
> > with RTEMS?
> 
> I haven't used thumb mode, but I think there are some difficulties
> you'll have to work around.
> 
> The last time I checked, gcc could generate ARM or THUMB instructions,
> but not both. If that's true, you'll need different compilers for
> exceptions (since they run in ARM mode) and everything else. You might
> need different assemblers as well.

The arm-rtems-gcc multilibs for ARM and Thumb so I think it is OK
to use a single compiler but being an either ARM or THUMB situation
makes sense.

Sounds like all assembly will have to be modified to be conditionally
compiled for THUMB mode.  Newlib has a lot of that in its assembly.
C code will take care of itself.


> Since exceptions always start in ARM mode, the current handlers would
> have to modified.

But since they are calling THUMB ISR Handlers, they would have to 
honor that, right?  And they wouldn't have to save as much context
since there aren't as many registers, right?

Thanks Jay.  Any insight would be appreciated.

>   ------------------------------------------------------------------------
>    Part 1.2Type: application/pgp-signature

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985