cygwin arm cross compiler

ARM 210浏览

Build process

GCC's t-arm-elf file was updated to enable support for the following options:

  • marm/mthumb (arm or thumb code generation)
  • mlittle-endian/mbig-endian (little or big endian architectures)
  • mhard-float/msoft-float (hardware or software fpu instructions)
  • mno-thumb-interwork/mthumb-interwork (arm-thumb modes interworking)
  • mcpu=arm7 (arm7 targets without hardware multiply)

The disabled options were mapcs-32/mapcs-26 (for old ARM machines with 26-bit program counters) and fno-leading-underscore/fleading-underscore (non-ELF library function format).

The following steps and configuration switches were used in the compilation process:

  1. cd [binutils-build]
  2. [binutils-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib
  3. make all install
  4. export PATH="$PATH:[toolchain-prefix]/bin"
  5. cd [gcc-build]
  6. [gcc-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib --enable-languages="c,c++" --with-newlib --with-headers=[newlib-source]/newlib/libc/include
  7. make all-gcc install-gcc
  8. cd [newlib-build]
  9. [newlib-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib
  10. make all install
  11. cd [gcc-build]
  12. make all install
  13. cd [gdb-build]
  14. [gdb-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --enable-interwork --enable-multilib
  15. make all install