[ECOS] EB55 target & Thumb instruction set
Eric de Jong
Thu Mar 4 07:53:00 GMT 2004
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
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.
----- 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:
> The led macro in hal_platform_setup.h uses a mov instruction with an 8bit
> 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?
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss