• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/getting-started/
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.6.�Setting up the Environment</title><link rel="stylesheet" href="cs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Sourcery CodeBench Lite"><link rel="up" href="chap-installation.html" title="Chapter�2.�Installation and Configuration"><link rel="prev" href="sec-updating.html" title="2.5.�Installing Sourcery CodeBench Lite Updates"><link rel="next" href="sec-uninstalling.html" title="2.7.�Uninstalling Sourcery CodeBench Lite"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.6.�Setting up the Environment</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-updating.html">Prev</a>�</td><th width="60%" align="center">Chapter�2.�Installation and Configuration</th><td width="20%" align="right">�<a accesskey="n" href="sec-uninstalling.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-setting-up-environment"></a>2.6.�Setting up the Environment</h2></div></div></div><p>
2      As with the installation process itself, the steps required to set
3      up your environment depend on your host operating system.
4    </p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id522369"></a>2.6.1.�Setting up the Environment on Microsoft Windows Hosts</h3></div></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="id522377"></a>2.6.1.1.�Setting the <code class="envar">PATH</code></h4></div></div></div><p>
5          If you installed Sourcery CodeBench Lite using the 
6          graphical installer then you may skip this step. The installer
7          does this setup for you.
8	</p><p>
9	  In order to use the Sourcery CodeBench tools from the command line, you
10	  should add them to your <code class="envar">PATH</code>.
11	  In the instructions that follow, replace
12          <em class="replaceable"><code>installdir</code></em> with the full pathname
13          of your Sourcery CodeBench Lite installation directory,
14	  including the drive letter. 
15	</p><p>
16          To set the <code class="envar">PATH</code> on a Microsoft Windows Vista system,
17          use the following command in a <code class="filename">cmd.exe</code> 
18          shell:
19          </p><pre class="screen">&gt; setx PATH "%PATH%;<em class="replaceable"><code>installdir</code></em>\bin"</pre><p>
20	</p><p>
21	  To set the <code class="envar">PATH</code> on a system running Microsoft Windows 7,
22	  from the desktop bring up the <code class="guimenu">Start</code> menu and
23          right click on <code class="guilabel">Computer</code>.
24          Select <code class="guimenuitem">Properties</code> and click on
25	  <code class="guilabel">Advanced system settings</code>.
26          Go to the <code class="guilabel">Advanced</code> tab,
27          then click on the <code class="guibutton">Environment Variables</code> button.
28          Select the <code class="envar">PATH</code> variable and click
29          <code class="guibutton">Edit</code>.
30          Add the string <code class="literal">;<em class="replaceable"><code>installdir</code></em>\bin</code>
31          to the end, and click <code class="guibutton">OK</code>.
32        </p><p>
33          To set the <code class="envar">PATH</code> on older versions of Microsoft
34          Windows, from the desktop
35          bring up the <code class="guimenu">Start</code> menu and
36          right click on <code class="guilabel">My Computer</code>.
37          Select <code class="guimenuitem">Properties</code>,
38          go to the <code class="guilabel">Advanced</code> tab,
39          then click on the <code class="guibutton">Environment Variables</code> button.
40          Select the <code class="envar">PATH</code> variable and click the
41          <code class="guibutton">Edit</code>.  
42          Add the string
43	  <code class="literal">;<em class="replaceable"><code>installdir</code></em>\bin</code>
44          to the end, and click <code class="guibutton">OK</code>.
45        </p><p>
46          You can verify that your <code class="envar">PATH</code> is set up correctly
47	  by starting a new <code class="filename">cmd.exe</code> shell and running:
48          </p><pre class="screen">&gt; arm-none-eabi-g++ -v</pre><p>
49          Verify that the last line of the output contains:
50          <code class="literal">Sourcery CodeBench Lite 2011.09-69</code>.
51        </p></div><div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title"><a name="sec-cygwin"></a>2.6.1.2.�Working with Cygwin</h4></div></div></div><p>
52          Sourcery CodeBench Lite does not require Cygwin or any other UNIX emulation
53          environment.  You can use Sourcery CodeBench directly 
54          
55          from the Windows command shell.  You can also use Sourcery CodeBench from
56          within the Cygwin environment, if you prefer.
57        </p><p>
58          The Cygwin emulation environment translates Windows path names
59          into UNIX path names.  For example, the Cygwin path 
60          <code class="filename">/home/user/hello.c</code> corresponds to the 
61          Windows path <code class="filename">c:\cygwin\home\user\hello.c</code>.
62          Because Sourcery CodeBench is not a Cygwin application, it does not, by
63          default, recognize Cygwin paths.
64        </p><p>
65          If you are using Sourcery CodeBench from Cygwin, you should set the
66          <code class="envar">CYGPATH</code> environment variable.  If this environment
67          variable is set, Sourcery CodeBench Lite automatically translates Cygwin path
68          names into Windows path names.  To set this environment
69          variable, type the following command in a Cygwin shell:
70          </p><pre class="screen">&gt; export CYGPATH=cygpath</pre><p>
71
72          To resolve Cygwin path names, Sourcery CodeBench relies on the
73          <code class="command">cygpath</code> utility provided with Cygwin.  You
74          must provide Sourcery CodeBench with the full path to
75          <code class="filename">cygpath</code> if <code class="command">cygpath</code> is not
76          in your <code class="envar">PATH</code>.  For example: 
77          </p><pre class="screen">&gt; export CYGPATH=c:/cygwin/bin/cygpath</pre><p>
78          directs Sourcery CodeBench Lite to use <code class="filename">c:/cygwin/bin/cygpath</code>
79          as the path conversion utility.  The value of
80          <code class="envar">CYGPATH</code> must be an ordinary Windows path, not
81          a Cygwin path.
82        </p></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id522681"></a>2.6.2.�
83	Setting up the Environment on
84	<span>
85	  GNU/Linux
86	  
87	</span>
88	
89	
90	Hosts
91      </h3></div></div></div><p>
92        If you installed Sourcery CodeBench Lite using the 
93        graphical installer then you may skip this step. The installer
94        does this setup for you.
95      </p><p>
96        Before using Sourcery CodeBench Lite you should add it to your
97        <code class="envar">PATH</code>.  The command you must use varies with the
98        particular command shell that you are using.  If you are using the
99        C Shell (<code class="command">csh</code> or <code class="command">tcsh</code>), use
100        the command:
101      </p><pre class="screen">&gt; setenv PATH <em class="replaceable"><code>installdir</code></em>/bin:$PATH</pre><p>
102        If you are using Bourne Shell (<code class="command">sh</code>), the Korn
103        Shell (<code class="command">ksh</code>), or another shell, use:
104      </p><pre class="screen">&gt; PATH=<em class="replaceable"><code>installdir</code></em>/bin:$PATH
105&gt; export PATH</pre><p>
106        If you are not sure which shell you are using, try both commands.
107        In both cases, replace <em class="replaceable"><code>installdir</code></em> with
108	the full pathname of your Sourcery CodeBench Lite installation directory.
109      </p><p>
110        You may also wish to set the <code class="envar">MANPATH</code> environment
111        variable so that you can access the Sourcery CodeBench manual pages, which
112        provide additional information about using Sourcery CodeBench.  To set the
113        <code class="envar">MANPATH</code> environment variable, follow the same steps
114        shown above, replacing <code class="envar">PATH</code> with
115        <code class="envar">MANPATH</code>, and <code class="filename">bin</code> with
116        <code class="filename">share/doc/sourceryg++-arm-none-eabi/man</code>.
117      </p><p>
118        You can test that your <code class="envar">PATH</code> is set up correctly by
119        running the following command:
120        </p><pre class="screen">&gt; arm-none-eabi-g++ -v</pre><p>
121        Verify that the last line of the output contains:
122        <code class="literal">Sourcery CodeBench Lite 2011.09-69</code>.
123      </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-updating.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="chap-installation.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="sec-uninstalling.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">2.5.�Installing Sourcery CodeBench Lite Updates�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�2.7.�Uninstalling Sourcery CodeBench Lite</td></tr></table></div></body></html>
124