TI E2E Community (Beta)
Welcome to the TI E2E (Engineer-to-Engineer) Community! We invite you to freely and openly interact with your peer Engineers, TI Engineers, and other experts in order to ask questions, share knowledge, explore ideas, and help solve problems.
More Search Options

Codec Engine 2.24 Example Demos Run Error (WinCE OAMP3530)

rated by 0 users
Answered (Verified) This post has 1 verified answer | 27 Replies | 4 Followers

Top 500 Contributor
33 Posts
Community Member
phoenixtju posted on 17 Jul 2009 10:37 AM

Hi, All

I am using OMAP3530 EVM with WinCE 6.0. I try to use ce2.24 which is download from ti.com, I compile the ce example demos and try to run them. But when I run the demo image1_copy , it turns up error as follows:

ti.sdo.ce.examples.apps.image1_copy - main> ti.sdo.ce.exmaples.apps.image1_copy
ti.sod.ce.examples.apps.image1_copy - App->Application started.
\HDD\ce\app_remote_wince.exe: error : can't open engine image1_copy
ti.sdo.ce.examples.apps.image1_copy - app done.

Would anyone give me some help to fix it?

Thanks in advance.

Stephen

Answered (Verified) Verified Answer

Top 500 Contributor
30 Posts
Texas Instruments Employee
Verified by phoenixtju

Hi Stephen,

It looks like dsplink is trying to allocate memory from one of the memory entries (memEntryId = 3), that is not valid for allocating from. If you look in the generated "C" file for your remote app, app_remote_wince_exe.c, which you can find under image1_copy/package/cfg/bin/ti_platforms_evm3530, you will see the memory table that was created from the server. It should look something like to following:

static Global_ArmDspLinkConfigMemTableEntry armDspLinkConfigMemTable_all_x64P[] = {
    { "DDR2", 0x87800000, 0x87800000, 0x00600000, 1, 0 },
    { "DSPLINKMEM", 0x87E00000, 0x87E00000, 0x00100000, 1, 0 },
    { "RESET_VECTOR", 0x87F00000, 0x87F00000, 0x00001000, 1, 0 },
    { "IVAMMU", 0x5D000000, 0x5D000000, 0x00001000, 0, 0 },
    { "L4PER", 0x49000000, 0x49000000, 0x00100000, 0, 0 },
    { "IRAM", 0x107F8000, 0x5C7F8000, 0x00008000, 1, 0 },
    { "L1DSRAM", 0x10F04000, 0x5CF04000, 0x0000C000, 1, 0 },
    { "DDRALGHEAP", 0x86000000, 0x86000000, 0x01800000, 0, 0 },
    { "L4CORE", 0x48000000, 0x48000000, 0x01000000, 0, 0 },
    { "CMEM", 0x00000000, 0x00000000, 0x00000000, 0, 0 },
    { NULL, 0, 0, 0, 0, 0 }
};

In this case, the memEntryId = 3, corresponds to "IVAMMU", which should not be used for allocations. When I break into the LDRV_SMM_alloc() code in Platform Builder, the memEntryId is 1, which corresponds to "DSPLINKMEM". If you run your app with CE_DEBUG = 2, you will see all the dsplink configuration in the trace, which shows the memEntryId values. For example, here is a part of the trace output I get:

3051160 PID:41b0012 TID:4390012 @3053,585,000us: [+3 T:0x04390012] OP - LINKCFG_Object generated for PROC_setup(p) ...

3051160 PID:41b0012 TID:4390012 @3053,585,000us: [+3 T:0x04390012] OP - linkCfg->gppObject->

3051160 PID:41b0012 TID:4390012 @3053,587,000us: [+3 T:0x04390012] OP -   name = "ARM9"

.....

3051160 PID:41b0012 TID:4390012 @3053,621,000us: [+3 T:0x04390012] OP - linkCfg->dspConfigs[0]->linkDrvObjects->

3051160 PID:41b0012 TID:4390012 @3053,621,000us: [+3 T:0x04390012] OP -   name = "SHMDRV"

3051160 PID:41b0012 TID:4390012 @3053,621,000us: [+3 T:0x04390012] OP -   hshkPollCount = 0x989680

3051160 PID:41b0012 TID:4390012 @3053,623,000us: [+3 T:0x04390012] OP -   memEntry = 0x1

3051160 PID:41b0012 TID:4390012 @3053,623,000us: [+3 T:0x04390012] OP -   ipsTableId = 0x0

3051160 PID:41b0012 TID:4390012 @3053,623,000us: [+3 T:0x04390012] OP -   numIpsEntries = 0x1

.....

So in my case, the dsplink driver object is using memEntry 1 ("DSPLINKMEM") for allocations. Can you take a look at your trace output at the linkCfg object that is dumped and see if any of the objects have a memEntry of 3? Have you changed any of the memEntry settings in Processor_dsplink_linkcfg_OMAP3530.c?

Thanks,

    Janet

 

All Replies

Top 500 Contributor
33 Posts
Community Member

Hi, Janet

I put the all.x64P under the "My Devices" directory, and put the app demos under the "Release" directory, right?

Yep, I want to have a try to rebuild the osal/wince package, maybe the whole ce package in the future.

 Thanks,

Stephen

Top 500 Contributor
30 Posts
Texas Instruments Employee

Hi Stephen,

In my case, when I bring up the remote file viewer, I see in the left panel a "Default Device", but maybe mine is just named

differently from yours. Under "Default Device", i have the folders "Application Data", "Documents and Settings",..., "Release", "Temp", "Windows".

I just export the "all.x64P" so it is at the top level of "Default Device". Is this similar to what you are doing?

Regards,

    Janet

 

Top 500 Contributor
33 Posts
Community Member

Hi, Janet,

the same as yours .

 

Thanks & Best Regards,

Stephen

Top 500 Contributor
33 Posts
Community Member

Hi,All

Today, I find something different error message in two cases. In all cases, I run the command "osalsetenv CE_DEBUG 3" first.


1. I put the all.x64P and app_remote_wince.exe in the same directory. When I run the demo, log messages and error messages below turn up:

1945979 PID:52d00f6 TID:53500f6 @1946,116,000us: [+0 T:0x053500f6 S:0x0004fae4] OM - Memory_alloc> return (0x50d60)

1945981 PID:52d00f6 TID:53500f6 @1946,118,000us: [+0 T:0x053500f6 S:0x0004fa90] CE - rserverOpen('all.x64P'), count = 0
1945981 PID:52d00f6 TID:53500f6 @1946,120,000us: [+0 T:0x053500f6 S:0x0004fa60] OP - Processor_create> Enter(imageName='all.x64P', linkCfg='(null)', attrs=0x4faa4)
1945985 PID:52d00f6 TID:53500f6 @1946,128,000us: [+7 T:0x053500f6 S:0x0004fa60] OP - Processor_create> ERROR: cannot access file all.x64P
1945986 PID:52d00f6 TID:53500f6 @1946,130,000us: [+6 T:0x053500f6 S:0x0004fa90] CE - rserverOpen: can't start 'all.x64P'; Processor_create failed

1945986 PID:52d00f6 TID:53500f6 @1946,130,000us: [+0 T:0x053500f6 S:0x0004fa90] CE - rserverOpen('all.x64P'): 0x0 done.
1945990 PID:52d00f6 TID:53500f6 @1946,138,000us: [+0 T:0x053500f6 S:0x0004fac0] CE - Engine_close(0x50d60)
1945990 PID:52d00f6 TID:53500f6 @1946,138,000us: [+0 T:0x053500f6 S:0x0004faa4] OM - Memory_free> Enter(0x50d60, 0x2c)
1945993 PID:52d00f6 TID:53500f6 @1946,144,000us: [+0 T:0x053500f6 S:0x0004faa4] OM - Memory_free> return (0x1)
1945993 PID:52d00f6 TID:53500f6 @1946,144,000us: [+0 T:0x053500f6 S:0x0004faf8] CE - Engine_open> return(0)
1945995 PID:52d00f6 TID:53500f6 \HDD\app_remote_wince.exe: error: can't open engine image1_copy

In this case, the error should be all.x64P can not be accessed, I think it means all.x64P can not be found.


2.  I put the all.x64P in the root folder just as Janet here told me, and put app_remote_wince.exe in \Release or my HardDisk Directory. When  I run the demo, log messge and error messages below turn up:

2022170 PID:4240126 TID:46d0126 @2022,318,000us: [+3 T:0x046d0126 S:0x0006fdec] OP - LINKCFG_Object generated for PROC_setup(p) ...
2022170 PID:4240126 TID:46d0126 @2022,318,000us: [+3 T:0x046d0126 S:0x0006fdec] OP - linkCfg->gppObject->
2022170 PID:4240126 TID:46d0126 @2022,318,000us: [+3 T:0x046d0126 S:0x0006fdec] OP -   name = "ARM9"
2022171 PID:4240126 TID:46d0126 @2022,320,000us: [+3 T:0x046d0126 S:0x0006fdec] OP -   maxMsgqs = 0x82
2022171 PID:4240126 TID:46d0126 @2022,320,000us: [+3 T:0x046d0126 S:0x0006fdec] OP -   maxChnlQueue = 0x10
2022171 PID:4240126 TID:46d0126 @2022,320,000us: [+3 T:0x046d0126 S:0x0006fdec] OP -   poolTableId = 0xffffffff
2023245 PID:4240126 TID:46d0126 @2024,468,000us: [+3 T:0x046d0126 S:0x0006fdec] OP -   numPools = 0x0
2023246 PID:4240126 TID:46d0126 @2024,470,000us: [+3 T:0x046d0126 S:0x0006fdec] OP -  .......................................................................................................dsplink config message

2023429 PID:4240126 TID:46d0126 @2024,836,000us: [+2 T:0x046d0126 S:0x0006fe04] OP - Processor_create_d> Attaching to DSP PROC...
2023431 PID:4240126 TID:46d0126 @2024,838,000us: [+7 T:0x046d0126 S:0x0006fe04] OP - Processor_create_d> Loading and starting DSP server 'all.x64P' FAILED, status=[0x80008052] (look for error code 'DSP_EBASE + 0x52' in dsplink*/pack 2023431 PID:4240126 TID:46d0126 ages/dsplink/gpp/inc/usr/errbase.h) 


2023433 PID:4240126 TID:46d0126 @2024,844,000us: [+0 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Enter (proc=0x50da0)
2023434 PID:4240126 TID:46d0126 @2024,846,000us: [+2 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Closing remote transport...
2023436 PID:4240126 TID:46d0126 @2024,850,000us: [+6 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Closing remote transport FAILED, status=0x80008002.
2023436 PID:4240126 TID:46d0126 @2024,850,000us: [+2 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Stopping DSP...
2023439 PID:4240126 TID:46d0126 @2024,856,000us: [+6 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Stopping DSP FAILED, status=0x80008002
2023439 PID:4240126 TID:46d0126 @2024,856,000us: [+2 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Closing pool...
2023440 PID:4240126 TID:46d0126 @2024,858,000us: [+6 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Closing pool FAILED, status=0x80008000
2023441 PID:4240126 TID:46d0126 @2024,860,000us: [+2 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Detaching from DSP...
2023442 PID:4240126 TID:46d0126 @2024,862,000us: [+6 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Detaching from DSP FAILED, status=0x80008000
2023446 PID:4240126 TID:46d0126 @2024,870,000us: [+2 T:0x046d0126 S:0x0006fdf0] OP - Processor_delete_d> Destroying DSP... (object, that is)

..............................

2023459 PID:4240126 TID:42500da @2024,896,000us: [+0 T:0x042500da S:0x0004fa38] OM - Memory_free> return (0x1)
2023459 PID:4240126 TID:42500da @2024,896,000us: [+0 T:0x042500da S:0x0004fa54] OP - Processor_delete> return.
2023460 PID:4240126 TID:42500da @2024,898,000us: [+6 T:0x042500da S:0x0004fa90] CE - rserverOpen: can't start 'all.x64P'; Processor_create failed
2023460 PID:4240126 TID:42500da @2024,898,000us: [+0 T:0x042500da S:0x0004fa90] CE - rserverOpen('all.x64P'): 0x0 done.

In this case, I think the error maybe the dsplink, all.x64P can be found, but when be loaded into dsp, some things based on DSPlink make error, right?

Would someone help me to check this?


Thanks & Best Regards,


Stephen

Top 500 Contributor
21 Posts
Community Member

Stephen,

The error basically means that the configuration of Codec Engine on the ARM side does not match the Codec Server's memory configuration. You will have to re-check your Server's .tcf file and also the configuration done in the Codec Engine IPC module.

This error is thrown from the DSP LINK and you may want to re-build the LINK with the trace options to know from which module [LDRV], this error is thrown.

 

Top 500 Contributor
30 Posts
Texas Instruments Employee

Hi Stephen,

If you're using the remote.cfg file as is for this example,  you should be ok with the memory configuration, since remote.cfg uses

Engine.createFromServer() to get the memory map. Unless you changed the server .tcf file, and did not re-run the configuration step

for the ARM side app, you should be ok. How are you building dsplink? You could re-build dsplink with tracing on, to get more info.

Here are the steps for re-building dsplink for OMAP353 with tracing enabled (taken from InstallGuide_WinCE_OMAP3530.pdf)

 (I'll assume you have installed dsplink in C:\mytools):

1. Set up the environment variables, TI_TOOLS_BASE_DIR, BIOS_INSTALL_DIR, XDCROOT, CGTOOLS_INSTALL_DIR, and BASE_PERL according to the locations where these tools are installed (check InstallGuide_WinCE_OMAP3530.pdf for explanation of these environment variables).

2. In the Platform Builder "Build" menu, select "Open Release Directory in Build Window" to get a command window with the WinCE environment set.

3. In the command window, run these three commands:

    cd C:\mytools\dsplink\etc\host\scripts\msdos

    .\dsplinkenv.bat

    .\dsplinkcfg.bat --platform=OMAP3530 --nodsp=1 --dspcfg_0=OMAP3530SHMEM --dspos_0=DSPBIOS5XX --gppos=WINCE --comps=poslm --trace=1

4. Edit the file C:\mytools\dsplink\gpp\src\pmgr\WinCE\drv_pmgr.c and uncomment the following two lines:

    TRC_ENABLE (ID_LDRV_PROC) ;

    TRC_SET_SEVERITY (TRC_ENTER) ;

5. Build the dsplink libraries:

    cd c:\mytools\dsplink

    gmake -C gpp/src

    gmake -C dsp/src

Make sure to copy the dsplink.dll to your flat release directory and rebuild your image. Also, make sure there are no old dsplink.dll files lying around that came with your BSP. If there are, you will need to rename or remove these.

6. You may also want to build and run the dsplink message app:

    cd c:\mytools\dsplink\gpp\src\samples\message

    gmake

    cd c:\mytools\dsplink\dsp\src\samples\message

    gmake

Copy the dsp side message.out and the ARM side messagegpp.exe to your flat release directory. To run the message example for 10 iterations, in a Platform Builder command window:

    s messagegpp /Release/message.out 10

Regards,

    Janet

 

Top 500 Contributor
33 Posts
Community Member

Hi, all

I trace the error to

5765523 PID:400002 TID:4af0776  LDRV_DRV_init status [0x8000801a]
5765534 PID:49d0772 TID:4af0776 @1473,544,704us: [+7 T:0x04af0776 S:0x0006fe04] OP - Processor_create_d> Loading and starting DSP server 'all.x64P' FAILED, status=[0x8000801a] (look for error code 'DSP_EBASE + 0x1a' in dsplink*/pack
5765535 PID:49d0772 TID:4af0776 ages/dsplink/gpp/inc/usr/errbase.h)

Thanks ,

Stephen

Top 500 Contributor
30 Posts
Texas Instruments Employee

Hi Stephen,

The error code is DSP_EVALUE (I'm not sure where that's coming from). You could try stepping through the dsplink code in LDRV_DRV_init() in the Platform Builder debugger, to see at which point the failure occurs. To do this, you can add

    DebugBreak();

at the beginning of LDRV_DRV_init(). (Make sure to inlude header files <windows.h> and <kfuncs.h>). Rebuild dsplink and put the debug dsplinkk.dll and dsplinkk.pdb files in your flat release directory. Then rebuild your image. When you run your app, you will break into the debugger, and you should be able to step through the code.

Regards,

    Janet

 

Top 500 Contributor
33 Posts
Community Member

Hi, Janet,

Can I be sure that it is the dspllink that makes the error and it has nothing to do with the codec engine?

I means that whether I can make sure the codec engine is ok , but the dsplink doesn't work well with the codec engine.

Thanks,

Stephen

Top 500 Contributor
30 Posts
Texas Instruments Employee

Hi Stephen,

I think the error is due to a mismatched dsplink configuration between the ARM side dsplinkk.dll and the dsp side all.x64P, since the

error being returned by dsplink (DSP_EBASE + 0x52), is DSP_ECONFIG. It would be nice to see the trace output from dsplink, to see

what exactly is being mis-configured.

Thanks,

    Janet

 

Top 500 Contributor
33 Posts
Community Member

Hi, Janet,

I have traced the error to

  67586 PID:400002 TID:5f2002a Leaving LDRV_SMM_init ()  status [0x8000]
  67588 PID:400002 TID:5f2002a Entered LDRV_SMM_alloc ()
 dspId [0x0]
 memEntryId [0x3]
 physAddr [0x0]
 dspVirtAddr [0xc09b5a94]
 gppVirtAddr [0xc09b5a90]
 size [0x100]
  67588 PID:400002 TID:5f2002a Leaving LDRV_SMM_alloc ()  status [0x8000801a]

the error is print out from ldrv_smm.c , but I have not found why it is error.

Thanks .

Stephen

 

Top 500 Contributor
30 Posts
Texas Instruments Employee
Verified by phoenixtju

Hi Stephen,

It looks like dsplink is trying to allocate memory from one of the memory entries (memEntryId = 3), that is not valid for allocating from. If you look in the generated "C" file for your remote app, app_remote_wince_exe.c, which you can find under image1_copy/package/cfg/bin/ti_platforms_evm3530, you will see the memory table that was created from the server. It should look something like to following:

static Global_ArmDspLinkConfigMemTableEntry armDspLinkConfigMemTable_all_x64P[] = {
    { "DDR2", 0x87800000, 0x87800000, 0x00600000, 1, 0 },
    { "DSPLINKMEM", 0x87E00000, 0x87E00000, 0x00100000, 1, 0 },
    { "RESET_VECTOR", 0x87F00000, 0x87F00000, 0x00001000, 1, 0 },
    { "IVAMMU", 0x5D000000, 0x5D000000, 0x00001000, 0, 0 },
    { "L4PER", 0x49000000, 0x49000000, 0x00100000, 0, 0 },
    { "IRAM", 0x107F8000, 0x5C7F8000, 0x00008000, 1, 0 },
    { "L1DSRAM", 0x10F04000, 0x5CF04000, 0x0000C000, 1, 0 },
    { "DDRALGHEAP", 0x86000000, 0x86000000, 0x01800000, 0, 0 },
    { "L4CORE", 0x48000000, 0x48000000, 0x01000000, 0, 0 },
    { "CMEM", 0x00000000, 0x00000000, 0x00000000, 0, 0 },
    { NULL, 0, 0, 0, 0, 0 }
};

In this case, the memEntryId = 3, corresponds to "IVAMMU", which should not be used for allocations. When I break into the LDRV_SMM_alloc() code in Platform Builder, the memEntryId is 1, which corresponds to "DSPLINKMEM". If you run your app with CE_DEBUG = 2, you will see all the dsplink configuration in the trace, which shows the memEntryId values. For example, here is a part of the trace output I get:

3051160 PID:41b0012 TID:4390012 @3053,585,000us: [+3 T:0x04390012] OP - LINKCFG_Object generated for PROC_setup(p) ...

3051160 PID:41b0012 TID:4390012 @3053,585,000us: [+3 T:0x04390012] OP - linkCfg->gppObject->

3051160 PID:41b0012 TID:4390012 @3053,587,000us: [+3 T:0x04390012] OP -   name = "ARM9"

.....

3051160 PID:41b0012 TID:4390012 @3053,621,000us: [+3 T:0x04390012] OP - linkCfg->dspConfigs[0]->linkDrvObjects->

3051160 PID:41b0012 TID:4390012 @3053,621,000us: [+3 T:0x04390012] OP -   name = "SHMDRV"

3051160 PID:41b0012 TID:4390012 @3053,621,000us: [+3 T:0x04390012] OP -   hshkPollCount = 0x989680

3051160 PID:41b0012 TID:4390012 @3053,623,000us: [+3 T:0x04390012] OP -   memEntry = 0x1

3051160 PID:41b0012 TID:4390012 @3053,623,000us: [+3 T:0x04390012] OP -   ipsTableId = 0x0

3051160 PID:41b0012 TID:4390012 @3053,623,000us: [+3 T:0x04390012] OP -   numIpsEntries = 0x1

.....

So in my case, the dsplink driver object is using memEntry 1 ("DSPLINKMEM") for allocations. Can you take a look at your trace output at the linkCfg object that is dumped and see if any of the objects have a memEntry of 3? Have you changed any of the memEntry settings in Processor_dsplink_linkcfg_OMAP3530.c?

Thanks,

    Janet

 

Top 500 Contributor
33 Posts
Community Member

Hi, All

I  now got  to know where and what the erro are, I am trying to fix them all.

I have resolved the problems above but still meet some other problems.

Maybe I will create a new post to disscuss with guys here.

Thanks a lot for guys who give me great help.

 

Best Regards,

Stephen

 

Page 2 of 2 (28 items) < Previous 1 2 |

ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". TI AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY TI. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.