cygwin arm cross compiler

本文档详细介绍了在Cygwin下构建GCC的t-arm-elf文件以支持ARM和Thumb代码生成、小端或大端架构、硬件或软件浮点指令等选项的过程。编译过程中涉及了binutils、GCC、newlib和GDB的配置与安装步骤,旨在创建一个支持interwork和multilib的ARM交叉编译链。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值