Automake question

Thomas Doerfler Thomas.Doerfler at embedded-brains.de
Wed Jul 29 12:16:43 UTC 2009


Ralf,

Ralf Corsepius wrote:
> On 07/29/2009 10:04 AM, Sebastian Huber wrote:
>> Ralf Corsepius wrote:
>>> On 07/29/2009 09:44 AM, Sebastian Huber wrote:
>>>> Hi,
>>>>
>>>> for a BSP I need to compile one module with non standard CFLAGS.
>>> Why? Under normal circumstances, you don't want to do this.
>>> In almost 100% of all cases, doing so is a bug.
>>>
>>> Ralf
>> On the ARMv4 architecture you have two instruction sets: ARM and THUMB.  I have
>> to compile one module with ARM instructions only (because some low level stuff
>> requires ARM mode): CPU_FLAGS without -mthumb.  The rest of the BSP will use
>> THUMB instructions: CPU_FLAGS with -mthumb.
> 
> That's your bug. Arm and thumb are different architectures, which must 
> not be mixed.

>From ARM7TDMIvE.pdf, chapter 3.9.1:
"If the processor is in THUMB state when an exception occurs, it will
automatically switch into ARM state when the PC is loaded with the
exception vector address."

We have a ARM7 system with a 16 bit external memory bus. Using Thumb
mode here gives us substantially more performance, b ut the exception
entry MUST be coded as ARM code. So we really have to intermix both
instruction sets (which is a "normal" way to work).

So it would really help to pass special CFLAGs to certain modules.

I understand, that usage of such a mechanism should be limited, though,
to avoid to get the whole tree unmaintainable.

wkr,
Thomas.

> 
> Ralf
> 
> 
> 
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users


-- 

--------------------------------------------
Embedded Brains GmbH
Thomas Doerfler        Obere Lagerstrasse 30
D-82178 Puchheim       Germany
email: Thomas.Doerfler at embedded-brains.de
Phone: +49-89-18908079-2
Fax:   +49-89-18908079-9



More information about the users mailing list