Embedded Linux
위치로그  |  태그  |  Diary  |  RF  |  Love  |  안부게시판

Toolchain 에 해당하는 글4 개    [목록보기▼]

개발환경 구축 - Cross compier 설치
     HBE-XM-Belverde | 2009/03/09 13:27

2009/03/09 13:27 2009/03/09 13:27
http://embedded.kr/entry/Toolchain-설치 참조

[root@localhost ~]$ mkdir /mnt/cdrom
[root@localhost ~]$ mount /dev/cdrom /mnt/cdrom
[root@localhost ~]$ cp /mnt/cdrom/tools/toolchain/arm-linux-gcc-3.3.2.tar.bz2
[root@localhost ~]$ cd /
[root@localhost /]$ tar -xjvf arm-linux-gcc-3.3.2.tar.bz2
[root@localhost /]$ vi /root/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
       . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/local/arm/3.3.2/bin

export PATH
unset USERNAME
[root@localhost /]$ source /root/.bash_profile
[root@localhost /]$ arm-linux-gcc -v
Reading specs from /usr/local/arm/3.3.2/bin/../lib/gcc-lib/arm-linux/3.3.2/specs
Configured with: ./configure --target=arm-linux --prefix=/usr/local/arm/3.3.2/ --with-headers=/home/sylam/armbuild/src/linux/include --disable-shared --disable-threads --enable-languages=c : (reconfigured) ./configure --target=arm-linux --prefix=/usr/local/arm/3.3.2/ --with-headers=/home/sylam/armbuild/src/linux/include
Thread model: posix
gcc version 3.3.2

.bash_profile 에 빨간색 부분을 추가 해서 source 명령어를 실행하면 어디서든지 Toolchain을 사용 할 수 있다.
이올린에 북마크하기(0) 이올린에 추천하기(0)

태그 : , ,
트랙백0 | 댓글쓰기0
Trackback address : http://embedded.kr/trackback/31
[로그인][오픈아이디란?]
아이디 : 비밀번호 :
내용 :
비밀글로 등록

우분투 설치 및 임베디드 개발환경 구축
     Linux/Ubuntu | 2008/03/26 23:15

2008/03/26 23:15 2008/03/26 23:15
실험실 PC에 페도라4를 설치해서 사용중이다. 하지만 수업이 끝나면 학생들이 설정을 바꾸거나 삭제를 해 버리는 실수를 하기 때문에 리눅스를 다시 설치해야 되는 상황이 발생한다. 지난주에 3대를 다시 설치 했다. 오늘 오전 수업에 또 다시 3대 컴퓨터가 작동되지 않는다. 페도라4 설치 시디는 5장이다. 설치 할 때마다 시디 바꾸기 귀잖아서 시디 한 장자리인 우분투로 설치하고 apt-get 을 이용하여 추가 설치하도록 하였다.

우분투 설치는 쉽다. 부팅 후 리눅스 화면에서 인스톨 아이콘을 클릭하여 설치하면 15분 정도 걸린다. 설치 후 임베디드 실습을 위해 개발환경을 구축해야 한다.

duwon@duwon:~$ sudo apt-get install xinetd tftp tftpd minicom build-essential
duwon@duwon:~$ wget ftp://ftp.arm.linux.org.uk/pub/armlinux/toolchain/cross-3.2.tar.bz2
duwon@duwon:~$ tar xjvf cross-3.2.tar.bz2
duwon@duwon:~$ sudo mv usr/local/arm /usr/local/
duwon@duwon:~$ vi .bashrc
export PATH=$PATH:/usr/local/arm/bin/

duwon@duwon:~$ source .bashrc
duwon@duwon:~$ arm-linux-gcc -v

arm-linux 용이라고 출력되면 정상적으로 툴체인시 설치 된 것이다. PATH 설정시 띄어쓰기 하지 말라.
이제 tftp 설정을 하도록 하자

duwon@duwon:~$ sudo vi /etc/xinetd.d/tftp
service tftp
{
        socket_type           = dgram
        protocol                = udp
        wait                     = yes
        user                     = root
        server                  = /usr/sbin/in.tftpd
        server_args           = -s /tftpboot
        disable                 = no
        per_source           = 11
        cps                     = 100 2
        flags                   = IPv4
}
duwon@duwon:~$ sudo /etc/init.d/xinetd restart
duwon@duwon:~$ sudo mkdir /tftpboot

이렇게 하면 tftp를 이용 할 수 있다. 정상적으로 작동되는지 확인 해 보자.


duwon@duwon:~$ sudo touch /tftpboot/testfile
duwon@duwon:~$ tftp localhost
> get testfile
> quit
duwon@duwon:~$ minicom -s

/tftpboot 폴더에 testfile 을 만들고 현재 홈 디렉트리로 파일을 다운받은 것이다. ls 명령어로 보면 testfile 이 있는 것을 확인 할 수 있다. tftp가 정상적으로 작동하지 않느다면 get testfile 할 때 에러를 내뱉을 것이다. 마지막으로 minicom 설정을 하면된다. 설정방법은 minicom 설정 글 참고.

tftp -> tftp cliet
tftpd -> tftp server
build-essential -> gcc compiler
이올린에 북마크하기(0) 이올린에 추천하기(0)

태그 : , , , ,
트랙백0 | 댓글쓰기0
Trackback address : http://embedded.kr/trackback/20
[로그인][오픈아이디란?]
아이디 : 비밀번호 :
내용 :
비밀글로 등록

Toolchain Test
     X-Hyper255A | 2006/08/09 11:09

2006/08/09 11:09 2006/08/09 11:09
Toolchain을 이용하여 compile 해보자. hyper 디렉토리 밑에 test 디렉토리를 만들어 테스트 하였다.
#mkdir /home/embed/xhyper/test
#cd /home/embed/xhyper/test
#vi hellow.c
#include <stdio.h>

int main()
{
   printf("hellow world");
   return 0;
}
#gcc -o hellow hellow.c
#arm-linux-gcc -o hellow-arm hellow.c
#file hellow
hellow: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), not stripped
#file hellow-arm
hellow-arm: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped
#./hellow-arm
bash: ./hellow-arm: cannot execute binary file
#./hellow
hellow world

만들어진 binary file을 확인하여 보면 서로 다른 것을 알 수 있다. 또한 파일을 실행시켜 보면 hellow-arm file은 실행이 안된다. 보드에 커널 부팅후 다운로드하여 실행하면 hellow world가 출력 될 것이다.
embeded board에 다운 로딩 하는 과정은 나중에 배우겠다.


이올린에 북마크하기(0) 이올린에 추천하기(0)

태그 : ,
트랙백0 | 댓글쓰기0
Trackback address : http://embedded.kr/trackback/8
[로그인][오픈아이디란?]
아이디 : 비밀번호 :
내용 :
비밀글로 등록

Toolchain 설치
     X-Hyper255A | 2006/08/08 14:33

2006/08/08 14:33 2006/08/08 14:33
Toolchain 이란?
Embedded System을 개발하기 위해 Host System이란 개발 환경이 필요하다. 임베디드 보드를 가지고 개발 할 수 있는가? Toolchain은 개발에 필요한 모든 환경을 통칭하는 말.
x86계열의 리눅스에서 gcc 를 이용하여 컴파일하면 x86에서 실행 가능한 바이너리가 생성된다, 그러나 X-Hyper255에서 사용 할려면 다른 Compiler가 필요하다. Cross compiler를 이용하여  Host PC에서 바이너리를 생성 후 serial, ethernet을 이용 X-Hyper255로 다운로드 한다.

Toolchain 설치
embed 라는 ID를 사용하여 이용하도록 하겠다. adduser를 이용하여 ID를 추가하자. 그러면 /home/embed 홈디렉토리가 생길 것이다. 이곳에 설치 했다.
CD의 파일을 그대로 복사하여 사용하겠다. 파일 복사후 쓰기가능한 모드로 바꿔 줘야 한다. 그렇지 않으면 파일 수정이 안된다.
#mount /mnt/cdrom/
#mkdir /home/embed/xhyper
#cp -a /mnt/cdrom/* /home/embed/xhyper/
#chmod -Rf 755 /home/embed/xhyper/*
#cd /home/embed/xhyper/Toolchain
#tar -xzvf hybus-arm-linux-R1.1.tar.gz
#vi /home/embed/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
       . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/home/embed/xhyper/Toolchain/hybus-arm-linux-R1.1/bin/

export PATH
unset USERNAME
#source /home/embed/.bash_profile

.bash_profile 에 빨간색 부분을 추가 해서 source 명령어를 실행하면 어디서든지 Toolchain을 사용 할 수 있다.
이올린에 북마크하기(0) 이올린에 추천하기(0)

태그 : ,
트랙백0 | 댓글쓰기0
Trackback address : http://embedded.kr/trackback/7
[로그인][오픈아이디란?]
아이디 : 비밀번호 :
내용 :
비밀글로 등록

[PREV] [1] [NEXT]

BLOG main image
Notice
전체 (26)
Linux (15)
X-Hyper255A (7)
HBE-XM-Belverde (4)
개발환경 구축 - TFTP 서버 셋팅
개발환경 구축 - JTAG
개발환경 구축 - Cross compi...
임베디드 시스템 개발 환경 설정
아이디와 비밀번호 한꺼번에...
wget 개발환경 구축 Ubuntu 우분투 실험 kernel Fedora bootp JTAG 임베디드 xinted Ubuntu server 리눅스 명령어 비밀번호 tftp 서버설정 Rewrite GRUB sshd 설치 root 안녕리눅스 VMware minicom find PXE Netboot Toolchain
좋은 정보 감사합니다. 출처...
2009 - firenux
Total : 73569
Today : 80
Yesterday : 72
태터툴즈 배너
rss
 
 
 
위치로그 : 태그 : 방명록 : 관리자
고을@’s Blog is powered by Tattertools.com