public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Lars Povlsen <lpovlsen@vitesse.com>
Cc: eCos Disuss <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] Thumb support for arm9 variants?
Date: Mon, 12 Jun 2006 20:56:00 -0000	[thread overview]
Message-ID: <20060612205549.GA32208@lunn.ch> (raw)
In-Reply-To: <4635C7499BD3A14C9361477F0613ED9B9B953F@mx-dk1.vsc.vitesse.com>

On Mon, Jun 12, 2006 at 10:02:57PM +0200, Lars Povlsen wrote:
> 
> Hello All!
> 
> I have been tinkering with a couple of ARM9/ARM926 platforms for which I
> have built an eCos HAL modeled after the ARM9 variants in
> packages/hal/arm/arm9/*. Everything (mostly) is looking great, but
> wanting to test the thumb-mode of my chips turned out to be less than
> straight-forward...
> 
> I deduced that I was unable to just "enable" in configtool due to
> missing "implements CYGINT_HAL_ARM_THUMB_ARCH". But with that added (and
> the -mthumb compile options that goes along), it seems that not all code
> in hal/arm/arm9 is "thumb"-compatible:
> 
> arm-elf-gcc -c
> -I/proj/sw/usr/lpovlsen/ecos/build_luton28_ram/install/include
> -I/users/lpovlsen/project/ecos/base/packages/hal/arm/arm9/var/current
> -I/users/lpovlsen/project/ecos/base/packages/hal/arm/arm9/var/current/sr
> c
> -I/users/lpovlsen/project/ecos/base/packages/hal/arm/arm9/var/current/te
> sts -I.
> -I/users/lpovlsen/project/ecos/base/packages/hal/arm/arm9/var/current/sr
> c/ -finline-limit=7000 -mthumb -mthumb-interwork -mcpu=arm9 -Wall
> -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -g -O2
> -ffunction-sections -fdata-sections  -fno-exceptions
> -Wp,-MD,src/arm9_misc.tmp -o src/hal_arm_arm9_var_arm9_misc.o
> /users/lpovlsen/project/ecos/base/packages/hal/arm/arm9/var/current/src/
> arm9_misc.c
> /tmp/ccmyIUwO.s: Assembler messages:
> /tmp/ccmyIUwO.s:24: Error: bad instruction `mrc p15,0,r1,c1,c0,0'
> /tmp/ccmyIUwO.s:24: Error: register expected, not '#0x000F' -- `orr
> r1,r1,#0x000F'
> /tmp/ccmyIUwO.s:24: Error: bad instruction `mcr p15,0,r1,c1,c0,0'
> /tmp/ccmyIUwO.s:26: Error: bad instruction `mrc p15,0,r1,c1,c0,0'
> /tmp/ccmyIUwO.s:26: Error: register expected, not '#0x1000' -- `orr
> r1,r1,#0x1000'
> /tmp/ccmyIUwO.s:26: Error: register expected, not '#0x0002' -- `orr
> r1,r1,#0x0002'
> /tmp/ccmyIUwO.s:26: Error: bad instruction `mcr p15,0,r1,c1,c0,0'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `mrs r1,cpsr'
> /tmp/ccmyIUwO.s:45: Error: register expected, not '#0x1F' -- `bic
> r1,r1,#0x1F'
> /tmp/ccmyIUwO.s:45: Error: register expected, not '#0x13' -- `orr
> r1,r1,#0x13'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `msr cpsr,r1'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `mcr p15,0,r1,c7,c7,0'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `mcr p15,0,r1,c7,c10,4'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `mcr p15,0,r1,c8,c7,0'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `mrc p15,0,r1,c1,c0,0'
> /tmp/ccmyIUwO.s:45: Error: register expected, not '#0x1000' -- `bic
> r1,r1,#0x1000'
> /tmp/ccmyIUwO.s:45: Error: register expected, not '#0x0007' -- `bic
> r1,r1,#0x0007'
> /tmp/ccmyIUwO.s:45: Error: bad instruction `mcr p15,0,r1,c1,c0,0'
> make[1]: *** [src/arm9_misc.o.d] Error 1 

Where did these fragments of assembly code come from?  I would not
expect the compiler to generate ARM code when it is supposed to be
generating thumb code. So is this some inline assembly? eg is this
cache manipulation? You might need to write thumb equivelents.

      Andrew

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

  reply	other threads:[~2006-06-12 20:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-12 20:03 Lars Povlsen
2006-06-12 20:56 ` Andrew Lunn [this message]
2006-06-12 21:12 Lars Povlsen
2006-06-12 21:39 ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060612205549.GA32208@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=lpovlsen@vitesse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).