OMAP353x EVM 调试video_copy

http://zhuairlunjj.blog.163.com/blog/static/80050945201153112020382/

最后一步出错:

root@omap3evm:/opt/video_copy# ./app_remote.xv5T
@0x000a660f:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.si<1>Start address is covered by existing entry, can not create TLB entry for address: [0x86300000] size: [0x10000]
Start address is covered by existing entry, can not create TLB entry for address: [0x86300000] size: [0x100000]
nglecpu - main> ti.sdo.ce.exampl<1> DSP_init status [0x80008050]
 DSP_init status [0x80008050]
es.apps.video_copy.singlecpu
@0x000a67d9:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Application started.
app: error: can't open engine video_copy
@0x000af77f:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - app done.

原因:

http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/29486.aspx

For OMAP EVM Rev G with 256MB TI forgot to update the tcf file and stayed with the old one for 128MB.

It took me few days to find it since I didn't got any answer in this forum :-( ....

Yehuda.

在DVEVM上,内存是256M,所以Codec中的例程都是按照256M内存进行配置的。而在,其他一些具体应用中,目标板的内存不一定为256M。所以,内存配置是Davinci开发板上一项重要的技术。

解决:
1.先把内存调为128M
setenv bootargs mem=128M console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rootwait
savenv
2.更改loadmodules.sh

# 0x80000000    99 MB   Linux
# 0x86300000    16 MB   CMEM
# 0x87300000    13 MB   CODEC SERVER


# Allocate 16MBB for CMEM
insmod cmemk.ko phys_start=0x86300000 phys_end=0x87300000 pools=1x5250000,1x1429
改为
# 0x80000000    128 MB   Linux
# 0x86300000    16 MB   CMEM
# 0x87300000    13 MB   CODEC SERVER


# Allocate 16MBB for CMEM
insmod cmemk.ko phys_start=0x88000000 phys_end=0x89000000 pools=1x5250000,1x1429
3. ./loadmodules.sh
<6>CMEMK module: built on Feb 18 2012 at 14:04:39
CMEMK module: built on Feb 18 2012 at 14:04:39
<6>  Reference Linux version 2.6.29
  Reference Linux version 2.6.29
<6>  File /home/nzm/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
  File /home/nzm/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
ioremap_nocache(0x88000000, 16777216)=0xcd000000
ioremap_nocache(0x88000000, 16777216)=0xcd000000
<6>allocated heap buffer 0xcd000000 of size 0x22000
allocated heap buffer 0xcd000000 of size 0x22000
<6>cmem initialized 7 pools between 0x88000000 and 0x89000000
cmem initialized 7 pools between 0x88000000 and 0x89000000
<1>DSPLINK Module (1.61.03) created on Date: Feb 18 2012 Time: 14:02:24
DSPLINK Module (1.61.03) created on Date: Feb 18 2012 Time: 14:02:24
<6>SDMAK module: built on Feb 18 2012 at 14:04:40
SDMAK module: built on Feb 18 2012 at 14:04:40
<6>  Reference Linux version 2.6.29
  Reference Linux version 2.6.29
<6>  File /home/nzm/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c
  File /home/nzm/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linuxutils/sdma/src/module/sdmak.c

4.
root@omap3evm:/opt/video_copy# ./app_remote.xv5T
@0x00048e1a:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - main> ti.sdo.ce.examples.apps.video_copy.singlecpu
@0x00048fe4:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Application started.
@0x000539a5:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 0...
@0x00053b8d:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 0 process returned - 0x0)
@0x00053cdd:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 0 process returned - 0x0)
@0x00053df0:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 1...
@0x00053f3f:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 1 process returned - 0x0)
@0x0005408f:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 1 process returned - 0x0)
@0x00054146:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 2...
@0x00054277:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 2 process returned - 0x0)
@0x00054404:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 2 process returned - 0x0)
@0x000544bb:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 3...
@0x0005460b:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 3 process returned - 0x0)
@0x0005473c:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 3 process returned - 0x0)
@0x000547f3:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - 4 frames encoded/decoded
@0x0005a00c:[T:0x4001d210] ti.sdo.ce.examples.apps.video_copy.singlecpu - app done.

OMAP3530开发环境搭建

1.      版本说明

DVSDK: DVSDK_3_00 3_00_02_44

PSP: OMAP35x-PSP-SDK-02.01.03.11

Kernel: Linux arago 2.6.29-rc3-omap1

2.      下载软件

         软件列表

1.        dvsdk_setuplinux_3_00_02_44.bin

2.        OMAP35x-PSP-SDK-setuplinux-02.01.03.11.bin

3.        cs1omap3530_setuplinux_1_00_01-44.bin

4.        bios_setuplinux_5_33_06.bin

5.        xdctools_setuplinux_3_15_01_59.bin

6.        TI-C6x-CGT-v6.0.16.1.bin

7.        arm-2008q1-126-arm-none-linux-gnueabi.bin

 

下载网址:

http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_3_00/3_00_02_44/index_FDS.html

3.      安装

1.      安装TI DVSDK:dvsdk_setuplinux_3_00_02_44.bin

目录:/omap3530/dvsdk

安装之后会生成dvsdk_3_00_02_24文件夹,下面包含很多文件夹,包含几乎整个davinci架构的代码。

 

2.      安装其他组件

bios_setuplinux_5_33_06.bin

cs1omap3530_setuplinux_1_00_01-44.bin

xdctools_setuplinux_3_15_01_59.bin

OMAP35x-PSP-SDK-setuplinux-02.01.03.11.bin

目录:/omap3530/dvsdk/dvsdk_3_00_02_24

 

3.      安装Linux下DSP的交叉编译工具链: TI-C6x-CGT-v6.0.16.1.bin

目录:/omap3530/TI/

 

4.      安装ARM交叉编译工具链:arm-2008q1-126-arm-none-linux-gnueabi.bin

目录:/omap3530/CodeSourcery/arm-2008q1

并设置环境变量:

export PATH=/omap3530/CodeSourcery/arm-2008q1:$PATH

(如果想要每次开机启动环境变量都生效,请将上句加入/etc/profile文件的末尾)

4.      配置

1.      /omap3530/dvsdk/ dvsdk_3_00_02_44/Rule.make

将其中的变量路径按实际安装情况修改,例如:

                     # Define target platform.

PLATFORM=omap3530

                 

# The installation directory of the DVSDK.

DVSDK_INSTALL_DIR=/omap3530/dvsdk/dvsdk_3_00_02_44

                       

# For backwards compatibility

DVEVM_INSTALL_DIR=$(DVSDK_INSTALL_DIR)

                        

# Where DSP/BIOS is installed.

BIOS_INSTALL_DIR=$(DVSDK_INSTALL_DIR)/bios_5_33_00_06

 

       2./omap3530/dvsdk/dvsdk_3_01_00_04/codec_engine_2_25_00_01/examples/xdcpath.mak

1)        设置平台、系统和程序类型

                            DEVICES  := OMAP3530

GPPOS := LINUX_GCC

PROGRAMS := APP_CLIENT DSP_SERVER

 

2)        设置变量安装路径

                     # (Mandatory) Specify where various components are installed.

CE_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/codec_engine_2_24

XDC_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/xdctools_3_15_01_59

BIOS_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/bios_5_33_06

DSPLINK_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/dsplink_1_61_03/packages

 

USE_CETOOLS_IF_EXISTS := 1

XDAIS_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/xdais_6_24

FC_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/framework_components_2_24

CMEM_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/linuxutils_2_24_02

 

WINCEUTILS_INSTALL_DIR:=

/omap3530/dvsdk/dvsdk_3_00_02_44/winceutils_1_00

BIOSUTILS_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/biosutils_1_01_00

EDMA3_LLD_INSTALL_DIR :=

 /omap3530/dvsdk/dvsdk_3_00_02_44/edma3_lld_01_10_00_01

LPM_INSTALL_DIR :=

/omap3530/dvsdk/dvsdk_3_00_02_44/local_power_manager_1_24

 

CGTOOLS_V5T := /omap3530/CodeSourcery/arm-2008q1

CC_V5T := bin/arm-none-linux-gnueabi-gcc

CGTARGET := gnu.targets.arm.GCArmv5T

 

CGTOOLS_C64P := /omap3530/dvsdk/TI/cg6x_6_0_16

#CC_C64P      := bin/cl6x

 

在文件末尾加上XDC_PATH的补充,否则编译会报错!!!

                            # XDC_PATH is complete. Any other components you could add as

XDC_PATH := $(XDC_PATH);$(LPM_INSTALL_DIR)/packages

                             (can't locate the package 'ti.bios.power' along the path:...)

 

5.      编译

1.        进入目录CE例程目录

#cd /omap3530/dvsdk/dvsdk_3_00_02_44/codec_engine_2_24/examples/ti/sdo/ce/examples/

              可以看到主要的关键的三个目录,apps,codecs,servers,分别放着应用程序代码,算法代码,算法服务器代码。

 

2.        编译server,选择all_codecs

                     #cd servers/all_codecs

#make clean

#make

编译完后会在bin/ti_platforms_evm3530/ 下生成来两个.x64P程序:

       all_pm.x64P  all.x64P

              (如果编译出错,大多数是前面配置Rule.make,和xdcpaht.mak出错,可以根据错误提示更改过来)

 

3.        编译应用app,选择video_copy

                     #cd apps/video_copy

#make clean

#make  

编译完后会在在bin/ti_platforms_evm3530/ 下生成来一个.xv5T程序:

app_remote.xv5T

这是应用在arm端,算法在dsp端的程序。

6.      执行

1.        将下列文件拷贝到开发板同一目录下,例如/home/root

算法服务器:all.64P

应用程序:app_remote.xv5T

内核驱动:cmemk.ko, dsplinkk.ko, lpm_omap3530.ko

内核加载脚本:loadmodules.sh unloadmodules.sh

 

2.        加载内核驱动

#./ loadmodules.sh

CMEMK module: built on Apr 21 2010 at 00:22:22

  Reference Linux version 2.6.29

  File /omap3530/dvsdk/dvsdk_3_00_02_44/linuxutils_2_24_02/packages/ti/sdo/linux

utils/cmem/src/module/cmemk.c

ioremap_nocache(0x85000000, 16777216)=0xca000000

allocated heap buffer 0xca000000 of size 0xcac000

cmem initialized 3 pools between 0x85000000 and 0x86000000

DSPLINK Module (1.61.03) created on Date: Apr 21 2010 Time: 03:48:32

如果出错,可能是驱动版本和当前内核版本不匹配,需要重新编译驱动,并重新编译server和app。

 

3.        执行应用程序

# ./app_remote.xv5T

@0x000f0053:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - main> ti.sdo.ce.examples.apps.video_copy.singlecpu

@0x000f025a:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Application started.

@0x000fbfa8:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 0...

@0x000fc116:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 0 process returned - 0x0)

@0x000fc247:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 0 process returned - 0x0)

@0x000fc378:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 1...

@0x000fc48b:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 1 process returned - 0x0)

@0x000fc57f:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 1 process returned - 0x0)

…………………

@0x00497a45:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Processing frame 127...

@0x00497b1b:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Encoder frame 127 process returned - 0x0)

@0x00497c0f:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - App-> Decoder frame 127 process returned - 0x0)

@0x00497ca7:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - 128 frames encoded/decoded

@0x0049986e:[T:0x4001d000] ti.sdo.ce.examples.apps.video_copy.singlecpu - app done.

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值