IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Gentoo Linux 系统下 arm-elf 开发环境的构建
猫猫草
post 2008-09-17 02:27:56, Wed
Post #1


猫猫猫
***

Group: Power Cat
Posts: 626
Joined: 2006-12-8
Member No.: 2



因为crossdev的bug(详见“Gentoo Linux 系统下 AVR 开发环境的构建”),所以步骤略微繁琐

1、构建 binutils

安装 crossdev 后,在联网状态下执行

代码
# crossdev --binutils 2.18.50.0.8 --gcc 4.3.1-r1 --libc 1.16.0  -s4 --ex-gdb --target arm-elf


binutils构建完毕后,下一个步骤即会出错,先不去管它

2、构建基本的GCC

代码
# PREFIX=$HOME/local/arm-elf
# export PREFIX


代码
# emerge --fetchonly gcc-4.1.2
# cd /tmp
# tar -xjf /usr/portage/distfiles/gcc-4.1.2.tar.bz2
# cd gcc-4.1.2
# mkdir obj-arm-elf
# cd obj-arm-elf
# ../configure --prefix=$PREFIX --target=arm-elf --enable-languages=c --disable-nls --disable-libssp
# make
# make install


注意此时 PATH 环境变量中应有 /opt/bin 的项目,且应排在 /usr/bin 之后

代码
# mkdir -p /opt/bin
# ln -s /root/local/avr/bin/arm-elf-gcc /opt/bin


代码
# arm-elf-gcc -v


3、构建完整 arm-elf-gcc

代码
# crossdev --binutils 2.18.50.0.8 --gcc 4.3.1-r1 --libc 1.16.0  -s4 --ex-gdb --target arm-elf
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2024-12-25 01:42