Chapter : 1
Making ARM-Cross Compiler on Linux
Date : Sun, 23 August 2009
Writer : Ataya P
Working Platform :
Lenovo Notebook , Intel Pentium Dual Core T2080 1.73GHz
2Gbyte RAM
Ubuntu 9.04 -Jaunty Jackalope
Cooking ingredient :
1.binutils-2.19
2.binutils-patch
3.gcc-4.4.1
4.newlib-1.17.0
5.gdb-6.8
Let's do it :
1.extract all sources
2. cd [binutils-build]
3. patch binutils source
4. [binutils-source]/configure --target=arm-elf --prefix=[too
5. make all install
6. export PATH="$PATH:[toolchain-prefix]
7. cd [gcc-build]
8. [gcc-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --
9. make all-gcc install-gcc
10. cd [newlib-build]
11. [newlib-sourc
12. make all install
13. cd [gcc-build]
14. make all install
15. cd [gdb-build]
16. [gdb-source]/configure --target=arm-elf --prefix=[toolchain-prefix] --
17. make all install
Now try to compile some source code by making hello_world.c
#include<stdio.h>
int main()
{
puts("hello world!");
return 0;
}
Then, use below command to compile and linking the code
- arm-elf-gcc -mcpu=arm7tdmi -mthumb -O2 -g -c hello_world.c
- arm-elf-gcc -mcpu=arm7tdmi -mthumb -o hello_world hello_world.o -lc
Files and Sourcecode :
binutil patch

- ataya_p's blog
- Login to post comments
Custom Search
