From: Geir Harris Hedemark <geir@dod.no>
To: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] Problems with ecosSWtools and thumb-elf
Date: Tue, 13 Jul 1999 03:35:00 -0000 [thread overview]
Message-ID: <xq3k8s496s9.fsf@hridil.ifi.uio.no> (raw)
In-Reply-To: <199907121338.OAA13615@peshwari.cygnus.co.uk>
jlarmour@cygnus.co.uk (Jonathan Larmour) writes:
> If you do go down that route, let the list know how you get on, and just
> ask if you have any problems. I'm sure someone should be able to help.
I did. I picked up binutils-2.9.1 and egcs-1.1.2. I compiled and
installed binutils first, then egcs. The options to configure were
--target=thumb-coff --prefix=/local/hacks/arm. For some reason there
is no elf support for thumb in binutils-2.9.1. Or was it egcs? I
forget.
1:
Since I will use this in an embedded system which will not run *nix or
even have a filesystem or a terminal, I did not have or need the
standard *.h files (stdio.h and so on). Had to define "inhibit_libc"
when compiling libgcc2.c so xgcc would not barf on some
includes. According to the code, that can lead to problems.
2:
The makefile did not find the assembler by itself, even if I was
compiling egcs with the same prefix as binutils. I had to have
thumb-coff-as in my path.
3:
The tests failed. It said:
checking whether the C compiler (/data/nova/imp/software/gnu/build-egcs/gcc/xgcc -B/data/nova/imp/software/gnu/build-egcs/gcc/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make: *** [configure-target-libiberty] Error 1
However, I was able to generate a .s and a .o file without
problems. If I tried to generate a a.out file directly, ld told me:
/local/hacks/arm/thumb-coff/bin/ld: cannot open crt0.o: No such file or directory
collect2: ld returned 1 exit status
I cannot find this file. However when I link things manually:
DEFAULT:
$(cc) $(ccflags) -c boot.c
$(ld) $(ldflags) -Map=image.map -o image.coff boot.o
$(objcopy) --output-target=tekhex -S --verbose image.coff image.hex
it works ok, assuming I take responsibility for start points and the like.
ldflags = -O2 --cref -M -L/local/hacks/arm/thumb-coff/lib
4:
When I try to use objdump to disassemble what I have just compiled
from tekhex or binary format, I get four-byte instructions, not thumb
code. Disassembling from coff works ok, I get sensible thumb code.
Seems I have solved my most immediate problem(s), but egcs seems to
have poorer cross-target support than the ecos tools. Is this correct?
Geir
next prev parent reply other threads:[~1999-07-13 3:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-12 5:23 Geir Harris Hedemark
1999-07-12 6:23 ` Ian Lance Taylor
1999-07-12 6:39 ` Jonathan Larmour
1999-07-12 7:39 ` Geir Harris Hedemark
1999-07-13 3:35 ` Geir Harris Hedemark [this message]
1999-07-13 10:47 ` Jonathan Larmour
1999-07-15 7:13 ` Geir Harris Hedemark
1999-07-15 7:35 ` Jonathan Larmour
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=xq3k8s496s9.fsf@hridil.ifi.uio.no \
--to=geir@dod.no \
--cc=ecos-discuss@sourceware.cygnus.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).