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