# Forum: ARM programming with GCC/GNU tools winarm and gnuarm problem

 Author: Tiong Loh (ctloh) Posted on: 2008-03-08 15:58

Rate this post
 0 ▲ useful ▼ not useful
hi all..
i have both winarm and gnuarm installed in my pc.i just wonder if i type
the command arm-elf-gcc which compiler is actually used?winarm or
gnuarm?
i also have install cygwin in my pc,is it both gnuarm and winarm need
cygwin to run?i am using XP.thanks all!!

 Author: Jonathan Dumaresq (dumarjo) Posted on: 2008-03-10 15:30

Rate this post
 0 ▲ useful ▼ not useful
Tiong Loh wrote:
> hi all..
> i have both winarm and gnuarm installed in my pc.i just wonder if i type
> the command arm-elf-gcc which compiler is actually used?winarm or
> gnuarm?
> i also have install cygwin in my pc,is it both gnuarm and winarm need
> cygwin to run?i am using XP.thanks all!!

The one you will call is the first one in your system path. The best
thing to do to test multiple compiler on the same machine is to use
vmware or something like this.

If I rember correctly, I think on dos based system we had a command
called where.exe (like which in unix) but this utility is no longer
there in windows XP. you probably be able to find it somewhere on the
net.

Regards

Jonathan

 Author: Martin Thomas (mthomas) (Moderator) Posted on: 2008-03-10 20:10

Rate this post
 0 ▲ useful ▼ not useful
Tiong Loh wrote:
> hi all..
> i have both winarm and gnuarm installed in my pc.i just wonder if i type
> the command arm-elf-gcc which compiler is actually used?winarm or
> gnuarm?

If the WinARM package is not very old the output from arm-elf-gcc
--version should  show the string "WinARM" with the package version
among other default information.

> i also have install cygwin in my pc,is it both gnuarm and winarm need
> cygwin to run?i am using XP.thanks all!!

The precompiled GNU toolchain in WinARM does not depent on Cygwin
Runtime support (dlls): no cygwin installation needed. AFAIK GNUARM
does, but I have not used GNUARM for a long time, so not sure.

Cygwins "Unix-Shell" and other Cygwin packages may be useful for your
daily work and/or if you are used to Unix/Linux environments. But be
aware that there might be side effects esp. a "dll-hell" with
cygwin1.dll and other dlls. That's why WinARM's precompiled GNU
toolchain has been compiled "Win32 native" and the package includes a
small set of tools in /utils/bin with make and some supporting programs
- no need to install cygwin for basic operation of make. If you have
used WinAVR before: WinARM tries to "act" the same.

 Author: Clifford Slocombe (clifford) Posted on: 2008-03-10 22:29

Rate this post
 0 ▲ useful ▼ not useful
I would recommend avoiding Cygwin unless you have a specific need that
only it can fulfill; but if you need to use both tools, you will need to
set the environment specifically for each one.

One way to do this is to create a batch file that sets the environment
as necessary. For example to place c:\winarm\bin at the head of the
search path to ensure that its executables take precedence it would
contain the command:

path = c:\winarm\bin;%path%

You can then invoke this batch file before building, or create a cmd.exe
short-cut that executes it on start-up using the /K option. You would
then have a different shortcut for each environment. If you use Cygwin's
bash shell I believe that you can similarly invoke a start-up script to
set the environment.

Another alternative is to use separate user accounts for each tool and
set teh environment up accordingly, but that is rather cumbersome.

If you are using an IDE, the IDE may have settings to enforce a
particular build environment.

Clifford

• $formula (LaTeX syntax)$