Re: Sementation fault

2007-03-13 Thread Andy Ngo
Make sure you link in the necessary CE libraries with your ARM application.  
This is what I had to link in with my ARM application:

export CE_DIR = /opt/dvevm_1_10/codec_engine_1_02/packages
export DSPLINK_DIR= /opt/dvevm_1_10/dsplink_1_30_08_02/packages
export CMEM_DIR   = /opt/dvevm_1_10/cmem_1_01/packages

EXTRA_LIBS = $(CE_DIR)/ti/sdo/ce/speech/lib/speech.a470MV \
 $(CE_DIR)/ti/sdo/ce/lib/ce.a470MV \
 $(CE_DIR)/ti/sdo/ce/node/lib/node.a470MV \
 $(CE_DIR)/ti/sdo/ce/utils/trace/lib/TraceUtil.a470MV \
 $(CE_DIR)/ti/sdo/ce/bioslog/lib/bioslog.a470MV \
 $(CE_DIR)/ti/sdo/ce/osal/lib/osal_dsplink_linux.a470MV \
 
$(DSPLINK_DIR)/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplink.lib \
 $(CMEM_DIR)/ti/sdo/linuxutils/cmem/lib/cmem.a \
 $(CE_DIR)/ti/sdo/ce/osal/alg/lib/alg.a470MV \
 $(CE_DIR)/ti/sdo/ce/trace/lib/gt.a470MV

myapp.out :
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(EXTRA_LIBS)

Regards,
Andy

- Original Message 
From: Subhash [EMAIL PROTECTED]
To: davinci-linux-open-source@linux.davincidsp.com
Sent: Tuesday, March 13, 2007 2:52:07 AM
Subject: Sementation fault


Hi All,
I am developing application on Davinci. I try to use codec engine APIs, and
I face few problems after integrating Codec engine in my application. I have
listed down the problems below 1. In my application first i called
CERuntime_init function. When I call Engine_open API it gives errors
undefined reference to `Engine_config and undefined reference to `GT 2. So
i declared above variables in my application to remove these erros(i think
its not the right way) and build the application successfully.3.And when I
run the application I got a Segmentation Fault in Engine_open.
I have linked all codec related libraries properly. You can also refer the
request posted by someone at the link
http://linux.omap.com/pipermail/davinci-linux-open-source/2006-September/000895.html
 ,
same problem I am facing here. Even though I called CERuntime_init then also
I am getting this error.
Error mesg:
Program received signal SIGSEGV, Segmentation fault.0x0002c6b4 in
Engine_open (name=0x2e7b4 videnc, attrs=0xbefffb24, ec=0xbefffb20) at
Engine.c:544.Please can any one help me on this.

Regards,
Subhash B Karigar
Technical Lead
Adamya Computing Technologies Pvt.Ltd,
# 37, Cheeranjivi Layout,
Near Vidyaniketan School,
Kempapura, Hebbal,
Bangalore - 560 024

Phone: +91(80) 2363 5744, 23635745
Mob:   +91 984 551 5696

Nothing is Impossible, as Impossible itself says I M Possible
I am A Slow Walker But I never walk Back --Abrahim Linkon

URL: www.adamya.com
Adamya is among the Top Twenty Bluetooth Sites.
www.topsitelists.com/bestsites/bluetooth/topsitestopsites.cgi?ID=59


Information transmitted by this E-MAIL is proprietary to ADAMYA and is
intended for use only by the individual or entity to which it is addressed,
and may
contain information that is privileged, confidential or exempt from
disclosure under applicable law. If you are not the intended recipient or it
appears that
this mail has been forwarded to you without proper authority, you are
notified that any use or dissemination of this information in any manner is
strictly
prohibited.In such cases, please notify us immediately at mail to:
[EMAIL PROTECTED]





___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: Sementation fault

2007-03-13 Thread Ring, Chris
Hmmm, have to be careful here.
 
The list of libraries to link in will vary with the application config.
For example, Andy, if you added a video codec to your application
config, you'd need to add video.a470MV.  If you enabled debug libraries,
you'd have to switch most of the libraries in the list.  Also, if you
had a codec which supported local execution (on the ARM), the list of
libraries would change when your app configured local:true vs.
local:false.
 
For exactly all these reasons, we _autogenerate_ the list of files to
link with as an output to the config step(!).  We're working on the XDC
tools to make this easier in future releases of the tooling, but for now
you can refer to the comments in
examples/apps/video_copy/dualcpu/makefile (interesting stuff copied
here):
# [CE] define EXAMPLES_ROOTDIR to point to root of CE/examples
directory
EXAMPLES_ROOTDIR := $(CURDIR)/../../..

# [CE] include the file that defines paths to XDC packages and XDC tools
include $(EXAMPLES_ROOTDIR)/xdcpaths.mak

# [CE] add the examples directory itself to the list of paths to
packages
XDC_PATH := $(EXAMPLES_ROOTDIR);$(XDC_PATH)

# [CE] include the makefile that rus XDC configuration step for our
# program configuration script.
#
# Input:
# XDC_CFGFILE: location of the program configuration script (if in
different
#  directory, include the relative path to the file)
# Implicit input: XDC_ROOT and XDC_PATH defined by the xdcpaths.mak
above
#
# Output:
# XDC_FLAGS:   additional compiler flags that must be added to existing 
#  CFLAGS or CPPFLAGS
# XDC_CFILE:   name of the XDC-generated C file; usually does not need
to be
#  used explicitly, the existing .c-.o rules will take care
of it
# XDC_OFILE:   name of object file produced by compiling XDC-generated C
file;
#  must be linked with the user's application
# XDC_LFILE:   list of Codec Engine libraries that must be supplied to
the
#  linker (usually as `cat $(XDC_LFILE)`)
# Implicit output: rule that generates .c file from the program
configuration
#  script (XDC_CFGFILE); rule to generate dummy package one
dir.
#  level below the script; rule that cleans generated files
XDC_CFGFILE = ./ceapp.cfg
include   $(EXAMPLES_ROOTDIR)/buildutils/xdccfg_linuxarm.mak
 
As described above, the config step generates several files which your
build environment will utilize.  Namely:
   1.  An autogenerated 'C' source file - all packages can interrogate
the configuration and generate tables, variables, etc into the XDC_CFILE
which the application must compile and link into it.
   2.  An autogenerated 'XDC_LFILE' linker command file (.xdl extension)
- all packages can contribute to the application's executable with
libraries by implementing a 'getLibs()' function in their package.xs
script.
   3.  A list of flags to add to your application's build - XDC_FLAGS.
 
Looking back at the original post by Subhash, it's clear that the
auto-generated XDC_CFILE is not being compiled/linked into the
application - XDC_CFILE contains the 'Engine_config' and 'GT' symbols,
among _many_ others.
 
Some related discussion here:
http://www.mail-archive.com/[EMAIL PROTECTED]
om/msg01380.html
 
Chris




From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Andy Ngo
Sent: Tuesday, March 13, 2007 1:03 PM
To: Subhash; davinci-linux-open-source@linux.davincidsp.com
Subject: Re: Sementation fault


Make sure you link in the necessary CE libraries with your ARM
application.  This is what I had to link in with my ARM application:
 
export CE_DIR = /opt/dvevm_1_10/codec_engine_1_02/packages
export DSPLINK_DIR= /opt/dvevm_1_10/dsplink_1_30_08_02/packages
export CMEM_DIR   = /opt/dvevm_1_10/cmem_1_01/packages

EXTRA_LIBS = $(CE_DIR)/ti/sdo/ce/speech/lib/speech.a470MV \
 $(CE_DIR)/ti/sdo/ce/lib/ce.a470MV \
 $(CE_DIR)/ti/sdo/ce/node/lib/node.a470MV \

$(CE_DIR)/ti/sdo/ce/utils/trace/lib/TraceUtil.a470MV \
 $(CE_DIR)/ti/sdo/ce/bioslog/lib/bioslog.a470MV \

$(CE_DIR)/ti/sdo/ce/osal/lib/osal_dsplink_linux.a470MV \

$(DSPLINK_DIR)/dsplink/gpp/export/BIN/Linux/Davinci/RELEASE/dsplink.lib
\
 $(CMEM_DIR)/ti/sdo/linuxutils/cmem/lib/cmem.a \
 $(CE_DIR)/ti/sdo/ce/osal/alg/lib/alg.a470MV \
 $(CE_DIR)/ti/sdo/ce/trace/lib/gt.a470MV

myapp.out :
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
$(EXTRA_LIBS)

Regards,
Andy

- Original Message 
From: Subhash [EMAIL PROTECTED]
To: davinci-linux-open-source@linux.davincidsp.com
Sent: Tuesday, March 13, 2007 2:52:07 AM
Subject: Sementation fault


Hi All,
I am developing

Re: Sementation fault

2007-03-13 Thread Andy Ngo
Thanks for correcting me, Chris; I totally forgot that I had to customize mine 
since I only use the audio part of the VISA API.  
For what I had to do, I didn't want to port my application code (very large and 
lots of files) into the way the XDC tools were
doing the compilation.  Instead, I created an object file (instead of 
executable) out of the CE part and link it with my
main application; that's why I had to link into the CE libraries I listed 
below; for the DSP side (CE server and codecs), I was 
able to do that somewhat independent of the ARM side.  The XDC tools are not 
flexible and hard to use and I found it
very difficult to merge the CE part with my standalone ARM application.


- Original Message 
From: Ring, Chris [EMAIL PROTECTED]
To: Andy Ngo [EMAIL PROTECTED]; Subhash [EMAIL PROTECTED]; 
davinci-linux-open-source@linux.davincidsp.com
Sent: Tuesday, March 13, 2007 2:25:59 PM
Subject: RE: Sementation fault


Hmmm, have to be careful here.
 
The list of libraries to link in will vary with the application config.  For 
example, Andy, if you added a video codec to your application config, you'd 
need to add video.a470MV.  If you enabled debug libraries, you'd have to switch 
most of the libraries in the list.  Also, if you had a codec which supported 
local execution (on the ARM), the list of libraries would change when your 
app configured local:true vs. local:false.
 
For exactly all these reasons, we _autogenerate_ the list of files to link with 
as an output to the config step(!).  We're working on the XDC tools to make 
this easier in future releases of the tooling, but for now you can refer to the 
comments in examples/apps/video_copy/dualcpu/makefile (interesting stuff copied 
here):
# [CE] define EXAMPLES_ROOTDIR to point to root of CE/examples directory
EXAMPLES_ROOTDIR := $(CURDIR)/../../..

# [CE] include the file that defines paths to XDC packages and XDC tools
include $(EXAMPLES_ROOTDIR)/xdcpaths.mak

# [CE] add the examples directory itself to the list of paths to packages
XDC_PATH := $(EXAMPLES_ROOTDIR);$(XDC_PATH)

# [CE] include the makefile that rus XDC configuration step for our
# program configuration script.
#
# Input:
# XDC_CFGFILE: location of the program configuration script (if in different
#  directory, include the relative path to the file)
# Implicit input: XDC_ROOT and XDC_PATH defined by the xdcpaths.mak above
#
# Output:
# XDC_FLAGS:   additional compiler flags that must be added to existing 
#  CFLAGS or CPPFLAGS
# XDC_CFILE:   name of the XDC-generated C file; usually does not need to be
#  used explicitly, the existing .c-.o rules will take care of it
# XDC_OFILE:   name of object file produced by compiling XDC-generated C file;
#  must be linked with the user's application
# XDC_LFILE:   list of Codec Engine libraries that must be supplied to the
#  linker (usually as `cat $(XDC_LFILE)`)
# Implicit output: rule that generates .c file from the program configuration
#  script (XDC_CFGFILE); rule to generate dummy package one dir.
#  level below the script; rule that cleans generated files
XDC_CFGFILE = ./ceapp.cfg
include   $(EXAMPLES_ROOTDIR)/buildutils/xdccfg_linuxarm.mak
 
As described above, the config step generates several files which your build 
environment will utilize.  Namely:
   1.  An autogenerated 'C' source file - all packages can interrogate the 
configuration and generate tables, variables, etc into the XDC_CFILE which the 
application must compile and link into it.
   2.  An autogenerated 'XDC_LFILE' linker command file (.xdl extension) - all 
packages can contribute to the application's executable with libraries by 
implementing a 'getLibs()' function in their package.xs script.
   3.  A list of flags to add to your application's build - XDC_FLAGS.
 
Looking back at the original post by Subhash, it's clear that the 
auto-generated XDC_CFILE is not being compiled/linked into the application - 
XDC_CFILE contains the 'Engine_config' and 'GT' symbols, among _many_ others.
 
Some related discussion here:
http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg01380.html
 
Chris




From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andy Ngo
Sent: Tuesday, March 13, 2007 1:03 PM
To: Subhash; davinci-linux-open-source@linux.davincidsp.com
Subject: Re: Sementation fault


Make sure you link in the necessary CE libraries with your ARM application.  
This is what I had to link in with my ARM application:
 
export CE_DIR = /opt/dvevm_1_10/codec_engine_1_02/packages
export DSPLINK_DIR= /opt/dvevm_1_10/dsplink_1_30_08_02/packages
export CMEM_DIR   = /opt/dvevm_1_10/cmem_1_01/packages

EXTRA_LIBS = $(CE_DIR)/ti/sdo/ce/speech/lib/speech.a470MV \
 $(CE_DIR)/ti/sdo/ce/lib/ce.a470MV \
 $(CE_DIR)/ti/sdo/ce/node/lib/node.a470MV \
 $(CE_DIR)/ti/sdo/ce/utils/trace/lib/TraceUtil.a470MV