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_copyti.sod.ce.examples.apps.image1_copy - App->Application started.\HDD\ce\app_remote_wince.exe: error : can't open engine image1_copyti.sdo.ce.examples.apps.image1_copy - app done.
Would anyone give me some help to fix it?
Thanks in advance.
Stephen
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
It would be helpful to see some trace output from this example. There is a description of codec engine tracing and how to set it at
http://tiexpressdsp.com/index.php/CE_DEBUG
You can use the utility, osalsetenv_wince.exe, in the directory ti\sdo\ce\osal\wince\utils\bin\ti_platforms_evm3530 of your codec engine installation to set a CE_DEBUG registry entry. This registry entry is used by codec engine to set the level of trace output. Can you copy this utility to your flat release directory, and then from Platorm Builder, open a target command window ('Target'->'Target Control'), and enter the command:
s osalsetenv_wince.exe CE_DEBUG 2
Then run the image1_copy example. You should see the trace output in the Platform Builder output window. That should indicate why the app is failing.
Hi, Janet,
Thanks for your reply. I tried as your advice. The log is as follow:
245819 PID:42c0022 TID:42d0022 @245,819,000us: [+0 T:0x042d0022] ti.sdo.ce.osal.Sem - Sem_create> count: 0
245821 PID:42c0022 TID:42d0022 @245,821,000us: [+0 T:0x042d0022] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x507c0]
245821 PID:42c0022 TID:42d0022 @245,823,000us: [+0 T:0x042d0022] ti.sdo.ce.osal.Sem - Sem_create> count: 0
245824 PID:42c0022 TID:42d0022 @245,829,000us: [+0 T:0x042d0022] ti.sdo.ce.osal.Sem - Leaving Sem_create> sem[0x507e0]
245825 PID:42c0022 TID:42d0022 @245,829,000us: [+0 T:0x042d0022] OT - Thread_create> Enter (fxn=0x2819c, attrs=0x0)
245827 PID:42c0022 TID:42d0022 @245,835,000us: [+0 T:0x042d0022] OT - Thread_create> Exit (task=0x50820)
245829 PID:42c0022 TID:42d0022 @245,839,000us: [+0 T:0x042d0022] ti.sdo.ce.alg - ALG_init> Enter
245830 PID:42c0022 TID:42d0022 @245,839,000us: [+0 T:0x042d0022] ti.sdo.ce.alg - ALG_init> Exit
245832 PID:42c0022 TID:42d0022 @245,845,000us: [+6 T:0x042d0022] CE - Engine_init> CE debugging on (CE_DEBUG=2; allowed CE_DEBUG levels: 1=min, 2=good, 3=max)
245834 PID:42c0022 TID:42d0022 @245,849,000us: [+0 T:0x042d0022] CS - Server_init()
245835 PID:42c0022 TID:42d0022 @245,849,000us: [+0 T:0x042d0022] CS - Server_init> We're not an xdc_target__isaCompatible_v5T (?? This is normal or false?)
245837 PID:42c0022 TID:42d0022 @245,855,000us: [+2 T:0x042d0022] ti.sdo.ce.examples.apps.image1_copy - main> ti.sdo.ce.examples.apps.image1_copy
245837 PID:42c0022 TID:42d0022 @245,855,000us: [+1 T:0x042d0022] ti.sdo.ce.examples.apps.image1_copy - App-> Application started.
245840 PID:42c0022 TID:42d0022 @245,861,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_alloc(1024) = 0x70000.
245841 PID:42c0022 TID:42d0022 @245,861,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_getPhys(0x70000) = 0x647ff000.
245843 PID:42c0022 TID:42d0022 @245,867,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_alloc(1024) = 0x80000.
245843 PID:42c0022 TID:42d0022 @245,867,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_getPhys(0x80000) = 0x647fe000.
245844 PID:42c0022 TID:42d0022 @245,869,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_alloc(1024) = 0x90000.
245844 PID:42c0022 TID:42d0022 @245,869,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_getPhys(0x90000) = 0x647fd000.
245845 PID:42c0022 TID:42d0022 @245,871,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_alloc(128) = 0xa0000.
245851 PID:42c0022 TID:42d0022 @245,879,000us: [+4 T:0x042d0022] OM - Memory_contigAlloc> CMEM_getPhys(0xa0000) = 0x647fc000.
245854 PID:42c0022 TID:45f0022 @245,887,000us: [+1 T:0x045f0022] OP - daemon> thread created.
245854 PID:42c0022 TID:45f0022 @245,889,000us: [+0 T:0x045f0022] OP - getCmd_d> Enter (proc=0x6fe3c)
245857 PID:42c0022 TID:45f0022 @245,895,000us: [+0 T:0x045f0022] ti.sdo.ce.osal.Sem - Entered Sem_pend> sem[0x507c0] timeout[0xffffffff]
245915 PID:400002 TID:42d0022 RELFSD: Opening file in.dat from desktop
246010 PID:400002 TID:42d0022 RELFSD: Opening file out.dat from desktop
246012 PID:42c0022 TID:42d0022 @246,205,000us: [+0 T:0x042d0022] CE - Engine_open> Enter('image1_copy', 0x0, 0x4fb0c)
246012 PID:42c0022 TID:42d0022 @246,205,000us: [+0 T:0x042d0022] CE - rserverOpen('all.x64P'), count = 0
246015 PID:42c0022 TID:42d0022 @246,211,000us: [+0 T:0x042d0022] OP - Processor_create> Enter(imageName='all.x64P', linkCfg='(null)', attrs=0x4faa0)
246017 PID:42c0022 TID:42d0022 @246,215,000us: [+7 T:0x042d0022] OP - Processor_create> ERROR: cannot access file all.x64P
246017 PID:42c0022 TID:42d0022 @246,215,000us: [+6 T:0x042d0022] CE - rserverOpen: can't start 'all.x64P'; Processor_create failed
246019 PID:42c0022 TID:42d0022 @246,219,000us: [+0 T:0x042d0022] CE - rserverOpen('all.x64P'): 0x0 done.
246020 PID:42c0022 TID:42d0022 @246,221,000us: [+0 T:0x042d0022] CE - Engine_close(0x50d60)
246022 PID:42c0022 TID:42d0022 @246,225,000us: [+0 T:0x042d0022] CE - Engine_open> return(0)
246024 PID:42c0022 TID:42d0022 \Release\app_remote_wince.exe: error: can't open engine image1_copy
246031 PID:42c0022 TID:42d0022 @246,243,000us: [+1 T:0x042d0022] ti.sdo.ce.examples.apps.image1_copy - app done.
phoenixtju:245835 PID:42c0022 TID:42d0022 @245,849,000us: [+0 T:0x042d0022] CS - Server_init> We're not an xdc_target__isaCompatible_v5T (?? This is normal or false?)
This one's ok (for now). It's related to Known Issue SDOCM00058702, but isn't causing your Engine_open() failure.
phoenixtju: 246015 PID:42c0022 TID:42d0022 @246,211,000us: [+0 T:0x042d0022] OP - Processor_create> Enter(imageName='all.x64P', linkCfg='(null)', attrs=0x4faa0) 246017 PID:42c0022 TID:42d0022 @246,215,000us: [+7 T:0x042d0022] OP - Processor_create> ERROR: cannot access file all.x64P
This is the real error. Engine_open() can't find the DSP server file (all.x64P). Have you copied your DSP-side all.x64P file to the ARM device, in the same directory as your application?
Chris
Hi, Chris,
Thanks for ur reply.I am sure that I do copy the all.x64P file to the same directory as the application.
Is there other reason that causes the error?
Best Regards,
Can you try exporting the all.x64P file using the Platform Builder 'Remote File VIewer'? It's under the 'Target'->'Remote Tools'->'File Viewer'
menu. In the Remote File Viewer, choose 'File'->'Export File', and browse to the location of your all.x64P file.
I have done this before, but the result is the same.
I really don't know how to fix it.
Would you pls give me a great help?
Stephen,
Have you made any changes to the remote.cfg file for this example, or are you using it as is?
I use it as it is.
The sources are provided in the Codec Engine release, is it possible to step through them in your Visual Studio?
A quick peek shows that ti/sdo/ce/ipc/dsplink/Processor_dsplink.c's Processor_create() is calling ti/sdo/ce/osal/wince/File_wince.c's File_stat() as a sanity check to ensure the file can be accessed before actually trying to load it onto the DSP.
File_stat() simply calls the Win32 GetFileAttributes() API, and that's returning INVALID_FILE_ATTRIBUTES. Are there any other funny attributes (like it's not readable, or it's only readable by certain users)?
Hi,Chris,
Thanks.
I checked Attibutes of all.x64P file, it is Archive only.
By the way, is it possible to skip the File_stat() check?
No easy way to skip the File_stat() check - if stepping through the code in a debugger, you could change the return value after it returned error. But we intentionally do the file check ahead of time to provide a 'nicer' error than the one DSP Link's PROC_load() will give.
I really don't know what the error is - if you can step through the code, it might be interesting to see what some of the return values are - or perhaps you can call GetLastError() immediately after returning from the failed Engine_open() and maybe it will contain more details about the failing GetFileAttributes() call? Or maybe you can create a simple, tiny app that 'does what File_stat() does' and run it from the same dir... assuming it returns the same error, you could work through that in a simpler use case.
Thanks a lot for your great help. I will have a try following your instructions, I will post the result after I create a simple app and test its result.
By the way, I am a newbie, so I have not master how to debug through the VS2005.
Best Regards,
I have tried your third way on PC,it works well. But still don't know why it comes to failure on WinCE.
By the way, can you find that Reg.h file in the directory codec_engine_2_24\packages\ti\sdo\ce\osal\wince, this file is included by Reg_wince.c in same directory?
Thanks & Best Regards
When you used the Remote File VIewer to export the all.x64P file, did you make sure to put it at the top level? There is no
concept of a "current directory" in Windows CE, so if you put it in the same directory as the app, that would not work.
Do you need "Reg.h" for rebuilding the osal/wince package? It is actually not used, so you could just remove the line
"Reg_wince.c",
(should be line 57 of package.bld).
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.