TI davinci 實驗遇到的問題及解決(待續)

 1: 配置好虛擬linux主機、windows主機的IP後,給開發的啓動參數寫入合適的IP後,開發板啓動到後面,顯示:Looking up port of RPC 10003/2 on 192.168.1.3(這是linux虛擬主機的IP)。。。。

      原因是linux主機的nfs服務沒有開啓。

     解決:可以在linux主機中的命令行上輸入: /etc/init.d/nfs restart

      返回指令顯示:Shutting down NFS mountd: 【failed】

                                   ........

                                  Starting NFS mountd:[ok]

        更好的解決方法是讓linux主機的nfs服務開機自啓動:

Chkconfig --list name  列出指定服務的運行級別情況
    Chkconfig   [--level <levels>]  <name>  <on|off|reset>  更改/重設指定服務的運行級別
  我們輸入chkconfig --level 345 nfs on,即可使NFS服務在運行級別3、4、5上自動運行。 

2.在合衆達的dvs6446 跑video_appd例程,出錯,報錯爲:
 TraceUtil> Error: Failed to open codec engine "video_copy.x64P"

出現這個問題是因爲運行的程序跟二進制的DSP文件不在一個文件夾,程序找不到對應的video_copy引擎,移到同一個文件夾下就OK了

即忘記把servers文件夾裏make生成的video_copy.x64P放入和運行程序video_appd放入一個文件夾


3.接上一個,上一個改好後,運行程序依舊報錯:(未解決)已經解決

以下錯誤反饋是複製來的,與我的反饋相似

[font=Times New Roman]loopback demo started.[/font]
[font=Times New Roman]Unable to handle kernel NULL pointer dereference at virtual address 00000000[/font]
[font=Times New Roman]pgd = c5d28000[/font]
[font=Times New Roman][00000000] *pgd=8637d031, *pte=00000000, *ppte=00000000[/font]
[font=Times New Roman]Internal error: Oops: 817 [#1][/font]
[font=Times New Roman]Modules linked in: dsplinkk cmemk[/font]
[font=Times New Roman]CPU: 0[/font]
[font=Times New Roman]PC is at SHMIPS_Send+0x114/0x13c [dsplinkk][/font]
[font=Times New Roman]LR is at SHMIPS_Send+0x10c/0x13c [dsplinkk][/font]
[font=Times New Roman]pc : [<bf00c704>]
lr : [<bf00c6fc>]
Tainted: PF[/font]
[font=Times New Roman]sp : c659fe68
ip : 8fe00080
fp : c659fe90[/font]
[font=Times New Roman]r10: bf015bc0
r9 : c8900180
r8 : 00000000[/font]
[font=Times New Roman]r7 : bf015bc0
r6 : c8900080
r5 : c8901100
r4 : 00008000[/font]
[font=Times New Roman]r3 : 87e01100
r2 : c8068060
r1 : 00000001
r0 : 00000000[/font]
[font=Times New Roman]Flags: nZCv
IRQs off
FIQs on
Mode SVC_32
Segment user[/font]
[font=Times New Roman]Control: 5317F
Table: 85D28000
DAC: 00000015[/font]
[font=Times New Roman]Process video_app (pid: 1115, stack limit = 0xc659e1a0)[/font]
[font=Times New Roman]Stack: (0xc659fe68 to 0xc65a0000)[/font]
[font=Times New Roman]fe60:
00008000 00000000 c889d000 00010000 412c9524 00000001[/font]
[font=Times New Roman]fe80: 000276f4 c659fed0 c659fe94 bf00db08 bf00c600 00000000 00000000 00000001[/font]
[font=Times New Roman]fea0: c88c6000 c8901100 8000802d 412c9524 00000000 00000000 c8078000 000276f4[/font]
[font=Times New Roman]fec0: 00008000 c659ff0c c659fed4 bf00a884 bf00da04 412c9524 0001bd1c 00000003[/font]
[font=Times New Roman]fee0: bf00d3c4 412c94d8 00008000 00006f05 412c94d8 c002d154 c659e000 00900036[/font]
[font=Times New Roman]ff00: c659ff1c c659ff10 bf005724 bf00a7e4 c659ff34 c659ff20 bf005474 bf005724[/font]
[font=Times New Roman]ff20: c6478900 ffffffe7 c659ff54 c659ff38 c0094c4c bf0051d4 c6478900 412c94d8[/font]
[font=Times New Roman]ff40: 00000008 00000000 c659ff7c c659ff58 c0094f54 c0094be0 00026d70 00000000[/font]
[font=Times New Roman]ff60: c6478900 fffffff7 00006f05 00000036 c659ffa4 c659ff80 c0094fb4 c0094c70[/font]
[font=Times New Roman]ff80: 00026d70 00000001 000000f0 00026cdc 00000001 000276f4 00000000 c659ffa8[/font]
[font=Times New Roman]ffa0: c002c9c0 c0094f84 00026cdc 00000001 00000008 00006f05 412c94d8 00027740[/font]
[font=Times New Roman]ffc0: 00026cdc 00000001 000276f4 412c9524 0001bd1c 000004b4 00026830 412c94d4[/font]
[font=Times New Roman]ffe0: 000268ac 412c9480 000146e0 401a0344 80000010 00000008 00000000 00000000[/font]
[font=Times New Roman]Backtrace:[/font]
[font=Times New Roman][<bf00c5f0>] (SHMIPS_Send+0x0/0x13c [dsplinkk]) from [<bf00db08>] (ZCPYMQT_Locat[/font]
[font=Times New Roman]e+0x114/0x2b0 [dsplinkk])[/font]
[font=Times New Roman][<bf00d9f4>] (ZCPYMQT_Locate+0x0/0x2b0 [dsplinkk]) from [<bf00a884>] (LDRV_MSGQ_[/font]
[font=Times New Roman]Locate+0xb0/0xf8 [dsplinkk])[/font]
[font=Times New Roman][<bf00a7d4>] (LDRV_MSGQ_Locate+0x0/0xf8 [dsplinkk]) from [<bf005724>] (PMGR_MSGQ[/font]
[font=Times New Roman]_Locate+0x10/0x14 [dsplinkk])[/font]
[font=Times New Roman][<bf005714>] (PMGR_MSGQ_Locate+0x0/0x14 [dsplinkk]) from [<bf005474>] (DRV_Ioctl[/font]
[font=Times New Roman]+0x2b0/0x34c [dsplinkk])[/font]
[font=Times New Roman][<bf0051c4>] (DRV_Ioctl+0x0/0x34c [dsplinkk]) from [<c0094c4c>] (do_ioctl+0x7c/0[/font]
[font=Times New Roman]x90)[/font]
[font=Times New Roman]
r5 = FFFFFFE7
r4 = C6478900[/font]
[font=Times New Roman][<c0094bd0>] (do_ioctl+0x0/0x90) from [<c0094f54>] (vfs_ioctl+0x2f4/0x314)[/font]
[font=Times New Roman]
r7 = 00000000
r6 = 00000008
r5 = 412C94D8
r4 = C6478900[/font]
[font=Times New Roman][<c0094c60>] (vfs_ioctl+0x0/0x314) from [<c0094fb4>] (sys_ioctl+0x40/0x64)[/font]
[font=Times New Roman]
r7 = 00000036
r6 = 00006F05
r5 = FFFFFFF7
r4 = C6478900[/font]
[<c0094f74>] (sys_ioctl+0x0/0x64) from [<c002c9c0>] (ret_fast_syscall+0x0/0x2c)[/font]
r6 = 000276F4
r5 = 00000001
r4 = 00026CDC[/font]
Code: e3a03001 ebfff2a4 e5963004 e3a01001 (e5803000)[/font]
<6>note: video_app[1115] exited with preempt_count 1[/font]
[font=Times New Roman]BUG: scheduling while atomic: video_app/0x00000001/1115[/font]
[font=Times New Roman]caller is do_exit+0xd3c/0xda0[/font]
我把未make clean掉,也就是本來在文件夾裏的video_copy.x64P放入運行文件夾,問題就沒有了。而自己在servers文件夾裏做make clean && make生成的video_copy.x64P就不行會報錯!

問題一定出在 server中!

原理:參考了davinci技術原理與應用指南p114~117頁內容。

    有三個方面的東西:dsplinkk.ko  loadmodules.sh video_copy.x64P.

它們間需要有幾個對應關係:

1.首先dsplinkk.ko中DSPLINKMEM起始地址和長度(在dsplink的子子文件夾裏有個CFG_Davinci.TXT定義了)需要與video_copy.x64P的DSPLINKMEM起始地址和長度(servers文件夾中的*.tcf文件定義的dsplink存儲區)相同。

2.loadmodules.sh中的語句 :

insmod dsplinkk.koddr_start=0x87600000ddr_size=0x800000

0x87600000 0x800000 必須與video_copy.x64P的標籤爲DDR的內存區起始地址和長度(servers文件夾中的*.tcf文件定義的片外程序和數據存儲區)相同。ddr_start 和 ddr_size 應該是指codec算法的片外程序和數據存儲區起始地址和長度

解決方法:保證了上述兩個條件就可以使程序正常運行。現在最簡單的方法就是把dsplink_1_30*/packages/dsplink/gpp/export/BIN/Linux/Davinci裏面的dsplinkk.so複製到運行文件夾中(之所以這樣,是因爲我查看了CFG_Davinci.TXT 的dsplinkmem定義與*.tcf相同,loadmodule.sh與*.tcf也相符合


        

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