public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Tarmo Kuuse <tarmo.kuuse@mail.ee>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: Questions about CodeSourcery g++ Lite tool chain and eCos
Date: Fri, 08 Apr 2011 10:57:00 -0000	[thread overview]
Message-ID: <inmpme$9pu$1@dough.gmane.org> (raw)
In-Reply-To: <55E5231BD2EB004EB1E67397C33B3A3E39ECF98D@ex004tcg>

Hi Eigil,

On 05.04.2011 10:57, Eigil Krogh Sørensen wrote:
> . Is it possible to use CodeSourcery g++ Lite toolchain for eCos? I would like to use that because the compiler is newer, gcc-4.5.1, than the gnutools for ARM, that comes with eCos, gcc-4.3. gcc-4.5. can make code ARM11 and Cortex-R/A.
>
> . Can CodeSourcery g++ Lite toolchain be used together with eCos config tool in Windows?
>
> . Which version of the CodeSourcery g++ Lite toolchain should be used with eCos?

I have succesfully used Sourcery G++ Personal to compile and link eCos 
in Windows. The graphical config tool works. I assume the latest version 
of SG++ Lite also works, but you'll have to test this.

It is a bit of a hassle, though.

1. SG++ is a native Windows program, meaning it expects Windows paths. 
Fortunately, it also supports CygWin paths. To enable this, the 
"cygpath" utility (installed with CygWin) must be made available:

1.1 Append your CygWin "/bin" directory to Windows path (right-click on 
My Computer, select "Properites", "Advanced", "Environment variables").

e.g. PATH="other stuff;C:\cygwin\bin"

1.2 Add a Windows system variable named "CYGPATH". Set it's value to 
"cygpath".

1.3 Start a new CygWin termial, verify that Bash shell can see both 
changes you made.

2. You need to add SG++ system headers to eCos. Before you do this the 
project should be cleaned.

In eCos configuration tool, under "Configuration", "Global build 
options", "Global compiler flags" following options should be added:

-isystem /cygdrive/c/Program\ Files/CodeSourcery/Sourcery\ G++\ 
Lite\lib/gcc/m68k-elf/4.3.3/include
-isystem /cygdrive/c/Program\ Files/CodeSourcery/Sourcery\ G++\ 
Lite\lib/gcc/m68k-elf/4.3.3/include-fixed

This assumes SG++ is installed to "C:\Program 
Files\CodeSourcery\Sourcery G++ Lite" and the GCC version is 4.3.3. 
Update this to match your setup.

3. Then ask the linker to not use it's standard library. Click on 
"Global linker flags". Add flag "-nostdlib".

Now save the configuration and select "Build", "Generate build tree".

4. Do not start the build from within configtool because it will not 
pass environment variables to compiler.

Instead, start a CygWin terminal, navigate to your eCos build directory, 
cross your fingers and type "make -j4".

I may have forgotten some details, but this should be the bulk of it.

--
Kind regards,
Tarmo Kuuse


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

  parent reply	other threads:[~2011-04-08 10:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-05  7:57 [ECOS] " Eigil Krogh Sørensen
2011-04-05  8:22 ` Stefan Sommerfeld
2011-04-05 12:59   ` Eigil Krogh Sørensen
2011-04-07 12:58     ` Stefan Sommerfeld
2011-04-08 10:57 ` Tarmo Kuuse [this message]
2011-04-08 11:19   ` [ECOS] " Tarmo Kuuse

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='inmpme$9pu$1@dough.gmane.org' \
    --to=tarmo.kuuse@mail.ee \
    --cc=ecos-discuss@sources.redhat.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).