1. 安装:
$ sudo apt-get install gcc-arm-linux-gnueabi
$ sudo apt-get install qemu-user qemu-system qemu-utils
2. C代码(hello.c)
#include <stdio.h>
int main(int argc, char* argv[])
{
printf("hello\n");
return 0;
}
3. 编译:
$ arm-linux-gnueabi-gcc hello.c -o hello -static
4. 运行:
$ qemu-arm ./hello
hello
Reference:
http://blog.youkuaiyun.com/hmsiwtv/article/details/19763709
http://blog.youkuaiyun.com/flyingcloude/article/details/9417791
本文介绍了如何在Linux环境下安装并配置ARM交叉编译环境,包括必要的软件安装、编写简单的C语言程序、编译及使用QEMU模拟器进行运行的过程。
4018

被折叠的 条评论
为什么被折叠?



