Rational Test RealTime 測試操作小結

啓動rational,存放目錄不一定是固定的。<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

[root@sdstc01 root]# cd Rational

[root@sdstc01 Rational]# cd releases/

[root@sdstc01 releases]# cd TestRealTime.v2002R2/

[root@sdstc01 TestRealTime.v2002R2]# ./start_testrt.sh

 

 

Temp下是自己的程序,此處的測試程序是test2test2就是在ration中用配置好的編譯器(c hharm24401)編譯hello.c生成的可執行文件,注意編輯時,他們因爲只有服務器上有license,所以就得換網段連到服務器上,編譯此文件,編譯完成後,再換回原來的網段。

[root@sdstc01 TestRealTime.v2002R2]# cd /home/temp

[root@sdstc01 temp]# ls

hello.o  products.h  test2  test2.spt  test2.tpf  TP.o

[root@sdstc01 temp]# file test2

test2: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux <?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />2.0.0, dynamically linked (uses shared libs), not stripped

 

 

 

解壓文件作系統,將剛纔編譯好的文件放到系統中,然後卸下系統,壓縮文件系統,傳到RAM板上。

[root@sdstc01 temp]# cd /

[root@sdstc01 /]# ls

bin   etc        initrd   lost+found  opt               root      tmp

boot  HHARM2440  inittab  misc        proc              sbin      usr

dev   home       lib      mnt         ramdisk.image.gz  tftpboot  var

[root@sdstc01 /]# gunzip ramdisk.image.gz            //解壓系統文件

[root@sdstc01 /]# mount -o loop ramdisk.image mnt  //mount系統文件

[root@sdstc01 /]# cd /mnt

[root@sdstc01 mnt]# ls

app  cramfs  etc     home   lib      lost+found  proc  tmp  var

bin  dev     hhtech  jffs2  linuxrc  mnt         sbin  usr

[root@sdstc01 mnt]# cd home

[root@sdstc01 home]# ls

temp

 [root@sdstc01 temp]# cd /home/temp

[root@sdstc01 temp]# ls

hello.o  products.h  test2  test2.spt  test2.tpf  TP.o

[root@sdstc01 temp]# cp test2 /mnt/home/temp     //將生成的可執行文件考到此文件系統中的同pc上的同一路徑下

[root@sdstc01 temp]# cd/mnt

bash: cd/mnt: ûÓÐÄǸöÎļþ»òĿ¼

[root@sdstc01 temp]# cd /mnt

[root@sdstc01 mnt]# ls

app  cramfs  etc     home   lib      lost+found  proc  tmp  var

bin  dev     hhtech  jffs2  linuxrc  mnt         sbin  usr

 [root@sdstc01 home]# cd temp

[root@sdstc01 temp]# ls

test2

[root@sdstc01 temp]# cd /

[root@sdstc01 /]# umount /mnt             //卸下文件系統

[root@sdstc01 /]# gzip ramdisk.image     //壓縮文件系統

[root@sdstc01 /]# ls

bin   etc        initrd   lost+found  opt               root      tmp

boot  HHARM2440  inittab  misc        proc              sbin      usr

dev   home       lib      mnt         ramdisk.image.gz  tftpboot  var

[root@sdstc01 /]# cp ramdisk.image.gz /tftpboot   //上傳文件

 

 

arm板上的使用及運行

[root@sdstc01 /]# minicom                     //進入arm系統

重啓arm板的時候,按空格,就轉到

SMDK2440 # tftp 0x30800000 ramdisk.image.gz      //下載上一步壓縮好的文件系統

SMDK2440 # fl 0x200000 0x30800000 0x300000      //重新燒寫程序,如果不燒寫不好用

 

再次重新arm板來到arm系統中,就可以看到同路徑下,我們自己編譯好的文件了。此時運行文件test2,可以看到生成了test2.sptspt採集了該程序運行的一些數據,將此spt文件上傳到pc上,用rational來進行分析,就可得到測試結果了(分析的過程沒有給做演示)

~ # ls

app         dev         home        linuxrc     proc        usr

bin         etc         jffs2       lost+found  sbin        var

cramfs      hhtech      lib         mnt         tmp

~ # cd home

/home # ls

httpd  temp

/home # cd temp/

/home/temp # ls

test2

/home/temp # ./test2

Hello world!

/home/temp # ls

test2      test2.spt

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章