* [ECOS] Problem with THUMB mode with AT91
@ 2003-09-22 12:52 Claudio Leonel
2003-09-23 6:45 ` Eric de Jong
0 siblings, 1 reply; 3+ messages in thread
From: Claudio Leonel @ 2003-09-22 12:52 UTC (permalink / raw)
To: ecos-discuss
Hi all,
I tried to generate a version of eCos for the AT91 EB55 platform
with THUMB MODE. I set the options in eCos configuration:
- Enable Thumb instruction set
- Enable Thumb interworking compiler option
I also included the '-mthumb' option in the Global Compiler Flags,
because setting the previous options was not enough (bug?).
I got an error in the assembly of the vectors.S file (see below),
but the problem seems to be in the 'hal_platform_setup.h' file in the
macros:"_led_init" and "_led"
It seems that it has instructions that are not THUMB compatible.
I am not familiar with ARM Assembly Language, does anyone know
how to fix this ?
===================================================================================
arm-elf-gcc -Wp,-MD,vectors.tmp
-I/home/LinServ/paks/srcpu1//ecos_ram/ecos_ram_install/include
-I/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current
-I/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src
-I/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/tests
-I. -mcpu=arm7tdmi -mthumb -mno-short-load-words -Wall -Wpointer-arith
-Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions
-fvtable-gc -finit-priority -c -o
/home/LinServ/paks/srcpu1//ecos_ram/ecos_ram_install/lib/vectors.o
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:
Assembler messages:
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:427:
Error: invalid immediate -- `mov r1,#0x0000FF00'
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:427:
Error: invalid immediate -- `mov r1,#(3<<8)'
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:457:
Error: invalid immediate -- `mov r1,#0x0000FF00'
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:457:
Error: invalid immediate -- `mov r1,#(2<<8)'
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:462:
Error: invalid immediate -- `mov r1,#0x0000FF00'
/home/LinServ/paks/ecos/cvs/ecos/packages/hal/arm/arch/current/src/vectors.S:462:
Error: invalid immediate -- `mov r1,#(1<<8)'
===================================================================================
Regards,
Claudio L. Salvadori
Elaxys Tecnologia
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Problem with THUMB mode with AT91
2003-09-22 12:52 [ECOS] Problem with THUMB mode with AT91 Claudio Leonel
@ 2003-09-23 6:45 ` Eric de Jong
2003-09-23 11:50 ` Andrew Lunn
0 siblings, 1 reply; 3+ messages in thread
From: Eric de Jong @ 2003-09-23 6:45 UTC (permalink / raw)
To: eCos discussion
The LED macro is not suited for use in thumb mode. I cannot say when this bug
was introduced, as I did use thumb mode without debugging once. The simplest way
is to comment out the LED calls in vector.S where thumb mode is used (line 427,
457, 462)
Another way is to modify the LED macro, eg change
mov r1,#0x0000FF00
to
mov r1,#0xFF
lsl r1, #8
and in .macro _led y (for my custom EB40A platform)
mov r1,#(\y<<16)
to
mov r1,#(\y)
lsl r1,#16
----- Original Message -----
From: "Claudio Leonel"
To: <ecos-discuss@sources.redhat.com>
Sent: Monday, September 22, 2003 11:52 AM
Subject: [ECOS] Problem with THUMB mode with AT91
Hi all,
I tried to generate a version of eCos for the AT91 EB55 platform
with THUMB MODE. I set the options in eCos configuration:
- Enable Thumb instruction set
- Enable Thumb interworking compiler option
I also included the '-mthumb' option in the Global Compiler Flags,
because setting the previous options was not enough (bug?).
I got an error in the assembly of the vectors.S file (see below),
but the problem seems to be in the 'hal_platform_setup.h' file in the
macros:"_led_init" and "_led"
It seems that it has instructions that are not THUMB compatible.
I am not familiar with ARM Assembly Language, does anyone know
how to fix this ?
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Problem with THUMB mode with AT91
2003-09-23 6:45 ` Eric de Jong
@ 2003-09-23 11:50 ` Andrew Lunn
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2003-09-23 11:50 UTC (permalink / raw)
To: Eric de Jong; +Cc: eCos discussion
On Tue, Sep 23, 2003 at 08:46:07AM +0200, Eric de Jong wrote:
> The LED macro is not suited for use in thumb mode. I cannot say when this bug
> was introduced, as I did use thumb mode without debugging once. The simplest way
> is to comment out the LED calls in vector.S where thumb mode is used (line 427,
> 457, 462)
> Another way is to modify the LED macro, eg change
> mov r1,#0x0000FF00
> to
> mov r1,#0xFF
> lsl r1, #8
>
> and in .macro _led y (for my custom EB40A platform)
> mov r1,#(\y<<16)
> to
> mov r1,#(\y)
> lsl r1,#16
Could you make a proper patch out of this, with a ChangeLog entry.
Thanks
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-09-23 11:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-22 12:52 [ECOS] Problem with THUMB mode with AT91 Claudio Leonel
2003-09-23 6:45 ` Eric de Jong
2003-09-23 11:50 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).