title: What are the correct options for an ARM cross compiler with crosstool-NG
body: <p>I am trying to build a cross compiler to target the processor running on my NAS box using <a href="http://crosstool-ng.org/" rel="noreferrer">crosstool-NG</a>.</p>
  
  <p>The NAS box is a <a href="http://zyxel.nas-central.org/wiki/Category%3aNSA-210" rel="noreferrer">ZyXEL NSA210</a>, there is an <a href="http://zyxel.nas-central.org/wiki/Dmesg_%28NSA-210%29" rel="noreferrer">example dmesg output</a>, the <code>/proc/cpuinfo</code> is:</p>
  
  <pre><code>Processor       : ARM926EJ-S rev 5 (v5l)
  BogoMIPS        : 183.09
  Features        : swp half thumb fastmult edsp java
  CPU implementer : 0x41
  CPU architecture: 5TEJ
  CPU variant     : 0x0
  CPU part        : 0x926
  CPU revision    : 5
  ...
  Hardware        : Oxsemi NAS
  Revision        : 0000
  Serial          : 00000d51caab2d00
  </code></pre>
  
  <p>The options on the target options page, the flag and my current settings in ():</p>
  
  <ul>
  <li>Target Architecture (arm)</li>
  <li>Use the MMU (yes)</li>
  <li>Endianness (Little endian)</li>
  <li>Bitness (32-bit)</li>
  <li>Default instruction set mode (arm)</li>
  <li>Use EABI (yes)</li>
  <li>Architecture level --with-arch= ()</li>
  <li>Emit assembly for CPU --with-cpu= ()</li>
  <li>Tune for CPU ()</li>
  <li>Use specific FPU ()</li>
  <li>Floating point (software)</li>
  <li>Target CFLAGS ()</li>
  <li>Target LDFLAGS ()</li>
  </ul>
  
  <p>I've been trying various combinations in the 'Architecture level' and 'Emit assembly for CPU', such as <code>arm926ej-s</code>, <code>armv5l</code>, <code>armv5tej</code>, but I don't know which option goes where.</p>
  
  <p>I've set the Target OS to bare-metal as crosstool-NG doesn't have the version of Linux used on the box.</p>
  
  <p>Also, once the toolchain is built do I need to pass the same options again to the compilers.</p>
  
  <p>So far by attempts have just produced the <code>Illegal instruction</code> message.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>If anyone could point me towards an article on setting up an ARM GCC toolchain with explicit reference of how to find out the correct parameters, that would answer my question.</p>