Brian Silverman | 5e4975c | 2013-03-29 17:41:22 -0700 | [diff] [blame^] | 1 | These are Brian's notes from building a toolchain on 2013-03-29. |
| 2 | It compiles the code successfully and lives in /opt/cortex-m3. |
| 3 | The flags are from logic, Austin's gcc, and |
| 4 | <http://www.coactionos.com/getting-started/43-building-and-installing-a-cortex-m3-compiler-on-ubuntu.html> |
| 5 | (for some of the newlib flags). |
| 6 | TODO(brians): make sure that it generates code that works and then update this |
| 7 | |
| 8 | binutils |
| 9 | ../binutils-2.23.2/configure --prefix=/opt/cortex-m3 --target=arm-eabi |
| 10 | make -j6 |
| 11 | make install |
| 12 | gcc |
| 13 | Symlinked in gmp-4.3.2, mpc-0.8.1, and mpfr-2.4.2 first. |
| 14 | ../gcc-4.5.4/configure --target=arm-eabi --prefix=/opt/cortex-m3 --enable-interwork --enable-multilib --enable-languages=c,c++ --with-newlib --with-headers --disable-shared --with-gnu-as --with-gnu-ld --with-cpu-cortex-m3 --disable-shared --with-float=soft --with-cpu=cortex-m3 --with-tune=cortex-m3 --disable-libmudflap --disable-libgomp --with-mode=thumb |
| 15 | make -j6 all-gcc |
| 16 | sudo make install-gcc |
| 17 | newlib |
| 18 | ../newlib-1.20.0/configure --target=arm-eabi --prefix=/opt/cortex-m3 --enable-interwork --enable-multilib --enable-languages=c,c++ --with-headers --disable-shared --with-gnu-as --with-gnu-ld --with-cpu-cortex-m3 --disable-shared --with-float=soft --with-cpu=cortex-m3 --with-tune=cortex-m3 --disable-libmudflap --disable-libgomp --with-mode=thumb --disable-werror --disable-newlib-supplied-syscalls --disable-nls --enable-target-optspace --disable-libssp --enable-newlib-reent-small --enable-newlib-multithread --disable-libgloss |
| 19 | make CFLAGS_FOR_TARGET="-D__IEEE_BIG_ENDIAN -D__IEEE_BYTES_LITTLE_ENDIAN -D__BUFSIZ__=128" |
| 20 | sudo make install |
| 21 | gcc |
| 22 | make -j6 |
| 23 | sudo make install |