This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: EB55 target & Thumb instruction set


Ok, I correct myself:

The 32bit arm instruction 'mov': can have a 8bit constant as parameter AND shift it.
(so 0x7F80 is valid)
The 16bit thumb instruction 'mov': can have a 8 bit constant as parameter. (0x7F80 is
not valid)
The ldi instruction can have any constant as parameter, as the compiler translates
this instruction in an ldr instruction, and places the constant itself into memory.

Eric

----- Original Message -----
From: "Jonathan Larmour"

Eric de Jong wrote:
>>>When I tried to build eCos with AT91EB55 target template and HAL's option
>>>"Enable Thumb instruction set" I've got the build error:
>>>arm-elf-gcc  ...
>
> /ecos-c/cygwin/opt/ecos/cvs_rep/packages/hal/arm/arch/current/src/vectors.S
>
> The led macro in hal_platform_setup.h uses a mov instruction with an 8bit
constant.
> This is supported in the arm instruction set, but not in the thumb instruction set.
> Replace the 'mov r1,#' instructions with 'ldr r1, =' in the led macro code.

I haven't thought about this much, but this doesn't sound right. the
parameter is a 16-bit half-word, so can't possibly fit into a 16-bit
instruction! Sure this change will let it compile, but the led macros won't
actually work. Or is that all you meant?

Jifl


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]