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" type="text/css" href="cs.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.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-ceip.html" title="2.7.�Customer Experience Improvement Program"></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-ceip.html">Next</a></td></tr></table><hr></div><div class="section"><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"><div class="titlepage"><div><div><h3 class="title"><a name="idm46915333941824"></a>2.6.1.�Setting up the Environment on Microsoft Windows Hosts</h3></div></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="idm46915333940880"></a>2.6.1.1.�Setting the <code class="envar">PATH</code></h4></div></div></div><p> 5 The graphical installer for Sourcery CodeBench Lite does this setup for you, 6 however it may not take effect until you next log in. 7 </p><p> 8 In order to use the Sourcery CodeBench tools from the command line, you 9 should add them to your <code class="envar">PATH</code>. 10 In the instructions that follow, replace 11 <em class="replaceable"><code>installdir</code></em> with the full pathname 12 of your Sourcery CodeBench Lite installation directory, 13 including the drive letter. 14 </p><p> 15 To set the <code class="envar">PATH</code> on a Microsoft Windows Vista system, 16 use the following command in a <code class="filename">cmd.exe</code> 17 shell: 18 </p><pre class="screen">> setx PATH "%PATH%;<em class="replaceable"><code>installdir</code></em>\bin"</pre><p> 19 </p><p> 20 To set the <code class="envar">PATH</code> on a system running Microsoft Windows 7, 21 from the desktop bring up the <code class="guimenu">Start</code> menu and 22 right click on <code class="guilabel">Computer</code>. 23 Select <code class="guimenuitem">Properties</code> and click on 24 <code class="guilabel">Advanced system settings</code>. 25 Go to the <code class="guilabel">Advanced</code> tab, 26 then click on the <code class="guibutton">Environment Variables</code> button. 27 Select the <code class="envar">PATH</code> variable and click 28 <code class="guibutton">Edit</code>. 29 Add the string <code class="literal">;<em class="replaceable"><code>installdir</code></em>\bin</code> 30 to the end, and click <code class="guibutton">OK</code>. 31 </p><p> 32 To set the <code class="envar">PATH</code> on a system running Microsoft Windows 8, 33 navigate to the <code class="guimenu">Charms</code> menu. Click 34 on <code class="guilabel">Search</code> then type <code class="literal">Control Panel</code>. 35 Select <code class="guimenuitem">System</code> and click on 36 <code class="guilabel">Advanced system settings</code>. 37 Go to the <code class="guilabel">Advanced</code> tab, 38 then click on the <code class="guibutton">Environment Variables</code> button. 39 Select the <code class="envar">PATH</code> variable and click 40 <code class="guibutton">Edit</code>. 41 Add the string <code class="literal">;<em class="replaceable"><code>installdir</code></em>\bin</code> 42 to the end, and click <code class="guibutton">OK</code>. 43 </p><p> 44 To set the <code class="envar">PATH</code> on older versions of Microsoft 45 Windows, from the desktop 46 bring up the <code class="guimenu">Start</code> menu and 47 right click on <code class="guilabel">My Computer</code>. 48 Select <code class="guimenuitem">Properties</code>, 49 go to the <code class="guilabel">Advanced</code> tab, 50 then click on the <code class="guibutton">Environment Variables</code> button. 51 Select the <code class="envar">PATH</code> variable and click the 52 <code class="guibutton">Edit</code>. 53 Add the string 54 <code class="literal">;<em class="replaceable"><code>installdir</code></em>\bin</code> 55 to the end, and click <code class="guibutton">OK</code>. 56 </p><p> 57 You can verify that your <code class="envar">PATH</code> is set up correctly 58 by starting a new <code class="filename">cmd.exe</code> shell and running: 59 </p><pre class="screen">> arm-none-eabi-gcc -v</pre><p> 60 Verify that the last line of the output contains: 61 <code class="literal">Sourcery CodeBench Lite 2013.11-24</code>. 62 </p></div><div class="section"><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> 63 Sourcery CodeBench Lite does not require Cygwin or any other UNIX emulation 64 environment. You can use Sourcery CodeBench directly 65 66 from the Windows command shell. You can also use Sourcery CodeBench from 67 within the Cygwin environment, if you prefer. 68 </p><p> 69 The Cygwin emulation environment translates Windows path names 70 into UNIX path names. For example, the Cygwin path 71 <code class="filename">/home/user/hello.c</code> corresponds to the 72 Windows path <code class="filename">c:\cygwin\home\user\hello.c</code>. 73 Because Sourcery CodeBench is not a Cygwin application, it does not, by 74 default, recognize Cygwin paths. 75 </p><p> 76 If you are using Sourcery CodeBench from Cygwin, you should set the 77 <code class="envar">CYGPATH</code> environment variable. If this environment 78 variable is set, Sourcery CodeBench Lite automatically translates Cygwin path 79 names into Windows path names. To set this environment 80 variable, type the following command in a Cygwin shell: 81 </p><pre class="screen">> export CYGPATH=cygpath</pre><p> 82 83 To resolve Cygwin path names, Sourcery CodeBench relies on the 84 <code class="command">cygpath</code> utility provided with Cygwin. You 85 must provide Sourcery CodeBench with the full path to 86 <code class="filename">cygpath</code> if <code class="command">cygpath</code> is not 87 in your <code class="envar">PATH</code>. For example: 88 </p><pre class="screen">> export CYGPATH=c:/cygwin/bin/cygpath</pre><p> 89 directs Sourcery CodeBench Lite to use <code class="filename">c:/cygwin/bin/cygpath</code> 90 as the path conversion utility. The value of 91 <code class="envar">CYGPATH</code> must be an ordinary Windows path, not 92 a Cygwin path. 93 </p></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="idm46915333898880"></a>2.6.2.� 94 Setting up the Environment on 95 <span class="phrase"> 96 GNU/Linux 97 </span> 98 99 Hosts 100 </h3></div></div></div><p> 101 The graphical installer for Sourcery CodeBench Lite does this setup for you, 102 however it may not take effect until you next log in. 103 </p><p> 104 Before using Sourcery CodeBench Lite you should add it to your 105 <code class="envar">PATH</code>. The command you must use varies with the 106 particular command shell that you are using. If you are using the 107 C Shell (<code class="command">csh</code> or <code class="command">tcsh</code>), use 108 the command: 109 </p><pre class="screen">> setenv PATH <em class="replaceable"><code>installdir</code></em>/bin:$PATH</pre><p> 110 If you are using Bourne Shell (<code class="command">sh</code>), the Korn 111 Shell (<code class="command">ksh</code>), or another shell, use: 112 </p><pre class="screen">> PATH=<em class="replaceable"><code>installdir</code></em>/bin:$PATH 113> export PATH</pre><p> 114 If you are not sure which shell you are using, try both commands. 115 In both cases, replace <em class="replaceable"><code>installdir</code></em> with 116 the full pathname of your Sourcery CodeBench Lite installation directory. 117 </p><p> 118 You may also wish to set the <code class="envar">MANPATH</code> environment 119 variable so that you can access the Sourcery CodeBench manual pages, which 120 provide additional information about using Sourcery CodeBench. To set the 121 <code class="envar">MANPATH</code> environment variable, follow the same steps 122 shown above, replacing <code class="envar">PATH</code> with 123 <code class="envar">MANPATH</code>, and <code class="filename">bin</code> with 124 <code class="filename">share/doc/arm-arm-none-eabi/man</code>. 125 </p><p> 126 You can test that your <code class="envar">PATH</code> is set up correctly by 127 running the following command: 128 </p><pre class="screen">> arm-none-eabi-gcc -v</pre><p> 129 Verify that the last line of the output contains: 130 <code class="literal">Sourcery CodeBench Lite 2013.11-24</code>. 131 </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-ceip.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.�Customer Experience Improvement Program</td></tr></table></div></body></html> 132