cortem4 编译器_贴一下自己的gnu工具链的编译参数 | gcc4.7 | cortex-m4,支持fpu

本帖最后由 si692828681 于 2012-12-30 13:17 编辑

今天突然想保存一下编译参数还有各部分的版本 ------ 弄到合适的太不容易了,当时是翻了好多文章,编译了好多次才通过的。。。(保存在自己电脑里,容易丢,所以贴在论坛里,也许还会有朋友用得着;还可以赚积分,现在太低了,好友都加不了。。。)

-------------------------------------------------------------------------------------------------------------------------------------

1. 编译 binutils

cd binutils-2.22/

./configure --target=arm-none-eabi --prefix=/home/tutu/tools/ --enable-interwork --enable-multilib --disable-nls --disable-libssp

make all

make install

cd ..

2. 编译 gcc with newlib (这里要分三步)

1)

cd gcc-4.7.1/

make objdir

cd objdir

../configure --target=arm-none-eabi --prefix=/home/tutu/tools/ --enable-interwork --enable-multilib --enable-languages=c --with-newlib --with-headers=../../newlib-1.20.0/newlib/libc/include/ --disable-libssp --disable-nls --with-system-zlib --with-float=hard --with-fpu=fpv4-sp-d16 --with-cpu=cortex-m4 --with-mode=thumb

make all-gcc

make install-gcc

cd ../..

2)

cd newlib-1.20.0/

./configure --target=arm-none-eabi --prefix=/home/tutu/tools/ --enable-interwork --enable-multilib --disable-libssp --disable-nls --with-float=hard --with-fpu=fpv4-sp-d16 --with-cpu=cortex-m4 --with-mode=thumb

make all

make install

cd ..

3)

cd gcc-4.7.1/objdir/

make all

make install

cd ../..

3. 编译 gdb

cd gdb-7.4/

./configure --target=arm-none-eabi --prefix=/home/tutu/tools/ --enable-interwork --enable-multilib --disable-libssp --disable-nls

make all

make install

cd ..

-------------------------------------------------------------------------------------------------------------------------------------

注意点:

--prefix=/home/tutu/tools/ 这是我安装的目录,要更换成你要安装的目录

有几个参数的意思,引用别人文章里的:

–enable-interwork: Allows ARM and Thumb code to be used

–enable-multilib: Build multible versions of some libs. E.g. one with soft float and one with hard

–disable-nls: Tells gcc to only support American English output messages

–disable-libssp: Don’t include stack smashing protection

–with-system-zlib: Fixes the error: configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值