Contents
Introduction
- gnu cross compile tool chain 구성하는 방법을 적는다.
필요한 것
- cross compile 을 위해 필요한 것은 cross-ld 와 cross-as 가 필요하다. (링커, 어셈블러)
- cross compile 을 위해 필요한 것은 cross-gcc 가 필요하다. (컴파일러)
- cross compile 을 위해 target system 에서 쓰일 library 가 필요하다.
Detailed Description
Binary tool chain
BUILD : x86 linux, TARGET : arm-wince-pe
gnuwince download and install
http://www.atomiser.org/open_source_wince/wincegcc031303.tar.bz2 를 다운받는다.
- /usr/local/ 에 압축 해제 한다. 그러면 wince 디렉토리가 생길 것이다.
USAGE
- PATH 에 /usr/local/wince/bin 을 삽입한다.
- 그리고 다음 코드를 build 해본다.
#include <stdio.h>
int
main(int argc, char *argv[])
{
FILE *fp;
fp = fopen("/temp/hello.log", "wb");
fprintf(fp, "hello, world!\n");
fclose(fp);
}
- 잘되는 군...
Source tool chain
- 잘 안된다. binary 가 젤 속편하네
BUILD : x86 linux, TARGET : arm-wince-pe
binutils-2.15 install
download : http://www.gnu.org/software/binutils/
./configure --target=arm-win-ce make make install
- make install 할때 ./install-sh 를 못 찾는 다는 에러가 나오면 Makefile 을 열어서 수정한다.
이것에서
INSTALL=./install-sh
이것으로
INSTALL=(절대 경로 입력)/install-sh
- /usr/local/bin 을 확인 해 보면 arm-wince-pe 시리즈가 눈에 띌 것이다.
gcc-3.4.3 install
- gcc 만 필요하다면 gcc-core-3.4.3.tar 만 설치하자. (패키지 안의 다른놈중에 에러 나는 것이 있다.)
download : ftp://tron.um.u-tokyo.ac.jp/pub/GNU/gcc/gcc-3.4.3/
./configure --target=arm-win-ce make make install
USAGE
- hello world build
Reference
http://linux.bytesex.org/cross-compiler.html 초강추 문서 (잘나와있다)
http://billgatliff.com/~bgat/twiki/bin/view/Crossgcc/WebHome 더 잘나와 있다.
http://www.atomiser.org/ gnuwince 가 있다.
