歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Ubuntu 16.04上編譯SkyEye的測試程序

Ubuntu 16.04上編譯SkyEye的測試程序

日期:2017/3/1 9:13:33   编辑:Linux編程

一、首先確保Ubuntu 16.04系統上已經安裝了Skyeye、skyeye-testsuite和arm-linux-gcc交叉編譯工具鏈,如果沒有安裝請參考:

1、Skyeye的安裝: http://www.linuxidc.com/Linux/2016-07/133745.htm

2、arm-linux-gcc的安裝: http://www.linuxidc.com/Linux/2016-07/133746.htm

二、編譯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的測試程序完成。

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved