[En-Nut-Discussion] ARM in Thumb mode

Adam Dybkowski adybkows at wp.pl
Sat Jan 10 21:24:17 CET 2009


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.

-- 
Adam Dybkowski
		adybkows at wp.pl
		http://dybkowski.net/



More information about the En-Nut-Discussion mailing list