| 82 | |
| 83 | ===== Arm Development For n-ORBIT CM ===== |
| 84 | |
| 85 | Good general instructions on setting up cross compilers and toolchain can be found in "Using Open Source Tools for STR7xx Cross Development" (Giacomo Antonino Fazio, Antonio Daniele Nasca, November 2007). This is more or less a subset of those instructions which worked for WINLAB ORBIT. |
| 86 | |
| 87 | 1. Connect the development target CM directly to the console. These instructions assume an OLIMEX ARM-USB-OCD connects it. |
| 88 | |
| 89 | 2. Install {{{openocd}}} from source on the console in {{{/usr/local}}}, using commands similar to the following. |
| 90 | |
| 91 | {{{ |
| 92 | $ apt-get install build-essential automake autoconf libusb libftdi-dev |
| 93 | $ cd /usr/local/src |
| 94 | $ svn checkout svn://svn.berlios.de/openocd/trunk openocd |
| 95 | $ cd openocd |
| 96 | $ ./bootstrap |
| 97 | $ ./configure --enable-ft2232_libftdi |
| 98 | $ make |
| 99 | $ make install |
| 100 | }}} |
| 101 | |
| 102 | You can try your luck with the Debian package of openocd, but development is still very active. If you encounter bugs you will likely be told to build from source anyway. |
| 103 | |
| 104 | 3. Create a {{{openocd}}} configuration file. |
| 105 | |
| 106 | A version that works for our OLIMEX ARM-USB-OCD is attached to this page. You may need to adjust the {{{ft2232_vid_pid}}} parameters by observing the output of {{{lsusb -v}}}. You will need a significantly different configuration file if you are using another interface. |
| 107 | |
| 108 | 4. Download source for the GNUARM toolchain, compile, and install, using commands similar to the following. |
| 109 | |
| 110 | {{{ |
| 111 | $ sudo apt-get install bzip2 |
| 112 | $ cd /usr/local/src |
| 113 | $ wget http://gnuarm.com/binutils-2.17.tar.bz2 |
| 114 | $ wget http://gnuarm.com/gcc-4.1.1.tar.bz2 |
| 115 | $ wget http://gnuarm.com/newlib-1.14.0.tar.gz |
| 116 | $ wget http://gnuarm.com/insight-6.5.tar.bz2 |
| 117 | $ tar jxvf binutils-2.17.tar.bz2 |
| 118 | $ cd binutils-2.17 |
| 119 | $ ./configure --target=arm-elf --enable-network --enable-multilib |
| 120 | $ make all |
| 121 | $ make install |
| 122 | $ export PATH=/usr/local/bin:$PATH |
| 123 | $ cd .. |
| 124 | $ tar jxvf gcc-4.1.1.tar.bz2 |
| 125 | $ tar zxvf newlib-1.14.0.tar.gz |
| 126 | $ cd gcc-4.1.1 |
| 127 | $ ./configure --target=arm-elf --prefix=/usr/local/gnuarm --enable-interwork --enable-multilib --enable-languages="c,c++" --with-newlib --with-headers=../newlib1.14.0/newlib/libc/include |
| 128 | $ make all-gcc |
| 129 | }}} |
| 130 | |