[En-Nut-Discussion] ARM in Thumb mode

Bernd Walter enut at cicely.de
Sat Jan 10 11:16:16 CET 2009


On Sat, Jan 10, 2009 at 01:43:39AM +0100, Adam Dybkowski wrote:
> Hi.
> 
> How can I compile and run Nut/OS in Thumb mode on AT91SAM7S256?
> I didn't find the answer in the En-Nut-Discussion Archives.

I'm pretty sure that it will work to some degree, because I'm running
my own code (on X256) in thumb mode without problems.
Some code parts however must be native, interrupt routines of course
and likely special things like context switching.

> The source code tells Thumb mode is not supported 
> (nut/arch/arm/os/context.c) but on this microcontroller the 
> Thumb-compiled code runs faster than in ARM mode, and the code size is 
> also important for me.
> 
> If this is not possible in current Nut/OS (cvs) version, I'd like to add 
> Thumb support to Nut/OS. Where should I start the development? I have a 
> board based on AT91SAM7S256 and JTAG cable.

I would asume the trick is just to define different compiler options
for the different set of files.

-- 
B.Walter <bernd at bwct.de> http://www.bwct.de
Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.



More information about the En-Nut-Discussion mailing list