简体   繁体   中英

Compiling a Linux program for ARM architecture - running on a host OS

I have a ARM Coretex-A8 development board from Freescale (i.MX53) running Linux Ubuntu. It boots up just fine and I can access the system with mouse/keyboard/terminal.

To get started I would like to make an application running on the board inside the host OS, just as you do when you run application on your PC.

My problem is to compile my test program, using toolchains like YAGARTO which is based on gcc i end up in trouble with the linking bacause I have not defined any startup script.

I find lot of information on building "bare metal" configurations (inluding compiling the kernel and make load and link scripts), but not anything usefull for making a application running on a host OS.

My development environment is running on Windows 7. I also have the option to run on Linux X86, but i doubt this whould help me making ARM applications.

For ARM-Linux application development the preferable choice is a Linux Host(x86) machine with a ARM toolchain installed in it. In Ubuntu Desktop machine you can use the following command to install ARM toolchain:

apt-get install gcc-arm-linux-gnueabi

After toolchain installation you can use the following command for cross compilation:

gcc-arm-linux-gnueabi-gcc -o hello hello.c

Using this toolchain you can cross-compile your C program using Standard C library without the need of startup code. Applications can be cross-compiled at your Host Linux(x86) platform and run on Target Linux(ARM) platform.

Windows version of ARM-Linux Toolchain is also available. You can get it from here .

Linaro Developers Wiki - an open organization focused on improving Linux on ARM, will be a good reference for your work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM