标签:
一、首先确保Ubuntu系统上已经安装了Skyeye、skyeye-testsuite和arm-linux-gcc交叉编译工具链,如果没有安装请参考:
1、Skyeye的安装:http://www.cnblogs.com/softhal/p/5697500.html
2、arm-linux-gcc的安装:http://www.cnblogs.com/softhal/p/5699381.html
二、编译skyeye-testsuite中的例子:
1、进入skyeye-testsuite的安装目录:skyeye-testsuite-1.2.5/code_coverage/arm_testcase,输入命令:
make
这个时候会提示arm-elf-gcc未安装,这是因为arm_testcase的Makefile中用的编译工具是arm-elf-gcc,修改Makefile文件:
gedit Makefile
把文件中的elf替换为linux,再次编译又会提示error: unrecognized command line option "-mapcs-32",直接把-mapcs-32去掉,具体是什么意思还不清楚,应该是arm-linux-gcc不支持这个选项或者是已经废弃的选项。再次make可以顺利的完成编译。
三、运行编译后的例子:
输入命令:
skyeye -e hello
可以看到运行信息:
Your elf file is little endian.
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x805f540
code coverage info: turn on profiling!
log_info: log start clock 13809223844193370112
log_info: log end clock 13809223844197564416
uart_mod:0, desc_in:, desc_out:, converter:
SKYEYE: use arm7100 mmu ops
Begin do code coverage between 0x1000000 and 0x1400000 .
start addr is set to 0x01000000 by exec file.
helloworldd
至此编译Skyeye的测试程序完成。
标签:
原文地址:http://www.cnblogs.com/softhal/p/5699531.html