[En-Nut-Discussion] ARM in Thumb mode

Bernd Walter enut at cicely.de
Tue Jan 13 14:47:22 CET 2009


On Sat, Jan 10, 2009 at 09:24:17PM +0100, Adam Dybkowski wrote:
> Paulo Silva(OpenSoftware) wrote:
> 
> >> 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.
> 
> > Maybe the option */interwork/*  is missing, give it to compiler if so, 
> > to compile using thumb mode.
> 
> In the current Ethernut version (and in CVS repository, too) the 
> -mthumb-interwork compiler option is already defined in 
> nut/Makedefs.arm-gcc file. There is no support (or I can't find any) to 
> compile Nut/OS code in Thumb mode (-mthumb compiler option). Some of the 
> Nut/OS files have to be compiled in ARM mode, for example interrupt 
> handler begin (later it can jump to Thumb code) and critical section 
> begin/end (MRS instruction is in ARM mode only). I didn't find any 
> definitions in Nut/OS makefiles that differentiate ARM/Thumb required 
> compiler modes - that's why I asked about it.
> 
> Bernard Walter, please write what you had to change in Nut/OS sources to 
> compile most of files in Thumb, but some of them in ARM mode. To save 
> Flash space, I have to compile my application in Thumb mode as well as 
> Nut/OS core, drivers etc.

I didn't compile Nut/OS in thumb, just my own code (excluding ISR.c).
Nut/OS ist still compiled 32bit with -thumb-interwork.
But I would be surprised if many Nut/OS Files depend on being 32bit.
For example I would expect the whole pro/ dir to work in thumb mode
without problems.
Since I don't have size problems in flash I'm mostly interested in speed
gains from running thumb.
Well - I expect to get some AT91SAM7X512 this month, but just because
I want more RAM.

-- 
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