This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unable to build project using c64x+ G.711 encoder library under CCSv5

Other Parts Discussed in Thread: OMAP-L138, CCSTUDIO, OMAP-L137

I have an OMAP-L138 development board, and the following version of software tools installed:

CCSv5 = 5.1.0.08020, BIOS = 6.32.04.49, XDCTOOLS = 3.22.03.41, XDAIS  = 7.21.01.05

I have successfully converted a C6726 based product from CCSv3.3 over to CCSv5.1 and gotten it to run on the OMAP-L138 dev board. My project did not use or require any XDC or SYS/BIOS components, and it runs just fine. I am switching over to a C6747 or C6748 chip so that I can take advantage of the C64x+ software libraries such as the G.711, G.722, and G.726 encoder/decoders.

I downloaded c64xplus_g711_1_12_00_000_production, created an "Empty Project" from the "Empty Project" templates, replaced the dummy main.c file with TestAppEncoder.c, and added g711enc_tii.l64P and XDM source files to the project that I created. When I attempted to build the project I  got the following error messsage:

     #5 could not open source file "std.h"    alg_create.c    /g711_enc    line 16    C/C++ Problem

After reading thru the TI forums, it seems that many people have run into this same problem. The two recommended solutions were either: (1)  to go to the project "Build Options -> Include Options" and manually add the include paths to find std.h in xdctools, or (2) create a new project, but this time use the "Empty RTSC Project" template. I chose the second option.  This resolved the missing "std.h" file problem, but then I ran into another build problem:

     This project does not contain a buildable RTSC Configuration (.cfg) file. In order for it to build, this project must contain one RTSC Configuration file that is not    excluded from build.

For whatever reason creating a "Empty RTSC Project" from the template does not produce a .cfg along with the project. [NOTE:  I selected "ti.targets.c674" as the TARGET, and "ti.platforms.sim67xx" as the PLATFORM for these empty template projects].

After reading thru the TI forums again, it seems that my choices were either to:  (1) create a SYS/BIOS project from one of the templates and use the .cfg that was created, or (2) use one of the .cfg files under  C:\ti\ccsv5\ccs_base\simulation\bin\configurations. I created app.cfg from the "SYS/BIOS -> Minimal" template, as well as hello.cfg from "SYS/BIOS -> Examples -> Hello"  template. 

When I added either app.cfg or hello.cfg to my g711 project, and then attempt to rebuild it, I get the following error message:

     Unsupported device!    .xdchelp    /g711_enc    237    C/C++ Problem

Finally I tried using one of the .cfg files from the ..\simulation\bin\configurations subdirectory. I tried separately building my g711 project using tisim_c674x_ca.cfg, tisim_C6747_ca.cfg, or tisim_C6747_pv.cfg.  In each case I got the following error message:

      missing ; before statement    tisim_c674x_ca.cfg    /g711_enc    6    C/C++ Problem

I have no idea what that error message means or how to resolve it.

Overall, I have searched all over the TI Forums and wiki pages, and I can't find a simple explanation of how to create a simple main.c file that creates a single instance of the g711 encoder that will build and run under CCSv5.  As soon as you use the common XDM files alg_create.c and alg_malloc.c, you then need to use std.h, and then you go down the tool chain rabbit hole.

Bottom line, how do you create a project in CCSv5 to create and build an instance of the g711 encoder that is found in c64xplus_g711_1_12_00_000_production.zip ?



  • I went back and re-examined G711_Codec_C64PLUS_UserGuide.pdf that was included as part of dm6446_g711enc_1_12_00_000_production.tar.  The installation instructions are for CCSv3.3, and don't apply to building a project under CCSv5.

    I did some further searches on the TI wiki pages and came across the following link:

         http://rtsc.eclipse.org/docs-tip/Consuming_Configurable_Content

    It appears that this RTSC repository should have had a file like g711enc.cfg which would look like:

        var System = xdc.useModule("xdc.runtime.System");

    And TestAppEncoder.c should have two lines at the top of the file stating:

        #include <xdc/std.h>

        #include <xdc/runtime/System.h>


    I went back to the TI website where I downloaded the g711 encoder/decoder, i.e.

         http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C64XPlus_Speech/index_FDS.html

    According to the website it says:

         All codecs are eXpressDSP compliant and implement one of the XDM 1.0 interfaces.
         Each codec is XDC packaged and validated on DM6446 EVM in a Codec Engine based test framework.


    I am seeking instructions on how to create a project in CCSv5 to build TestAppEncoder.c  either for an OMAP-L138 platform or the C674x software simulator. I haven't used any of the XDC tools in CCSv5, and I need help specifying a repository path(?) to the proper location in the unzipped .tar package to build the test application.






  • Hello team,

    Has anyone had an opportunity to review this inquiry?

    Regards,

  • Joseph,

    I tried to recreate the scenario you described but failed. Can you publish your CCS project?

    Alan

  • Hello,

    I have attached a zipped file containing my project. The following are the steps I used to create the project:

    1.  I copied the contents of the untarred file dm6446_g711enc_1_12_00_000_production to the location C:\Vx12\CCSv5_workspace.

    2.  I created an Empty RTSC project located at:

              C:\Vx12\CCSv5_workspace\dm6446_g711enc_1_12_00_000_production\packages\ti\sdo\codecs\g711enc\package

         (I zipped up all the files below ..\g711enc)

    3.  Next I added the following files to the project: TestAppEncoder.c, TestAppEncoder.h, TestAppConfigParser.c, TstApp.h, alg_create.c, alg_malloc.c.

    4.  When I build the project I get the following error message:

             #5 could not open source file "std.h"    TestAppEncoder.c    /g711enc    line 18    C/C++ Problem

    5.  Next I hand modify TestAppEncoder.c, alg_malloc.c, and alg.create.c to change

            #include <std.h>   to  #include <xdc/std.h>

    6.  When I recompile the modified files I get the following error messages:

             #5 could not open source file "alg.h"    alg_create.c    /g711enc    line 17    C/C++ Problem
             #5 could not open source file "xdas.h"    TestApp.h    /g711enc    line 20    C/C++ Problem

    This is my latest attempt at trying to build the test app for the g711 encoder.  I was hoping that you can tell me what I did wrong, and how to properly build  an instance of the g711 encoder.

    4135.g711enc.zip


  • Addendum:

    1.  The header files alg.h and _alg.h do not exist under C:\ti\xdias_7_21_01_05_eng or  C:\ti\xdctools_3_22_03_41 (which were installed as part of CCSv5 installation).  My attempt to fix the problem was to use the header files located under C:\CCStudio_v3.3\C6000\xdias\src\api.

    2.  The header file xdas.h is located under C:\ti\xdias_7_21_01_05_eng\packages\ti\xdias, so I am not sure why the CCSv5 tool chain could not find it.

  • I'm going to move this to the Codec forum as this appears to be specific to the G.711 codec and its build process.

    Hopefully someone there can help.

    Chris

  • Since I haven't received any feedback in 6 days, I continued to do some additional research on my own.

    The C6748, C6747, and C66xx processors are all capable of running code built for a C64x+ target, so I went to the codec download page for the C66xx processor:

         http://software-dl.ti.com/dsps/dsps_public_sw/codecs/C6X_Speech/2_00_000/index_FDS.html

    The G.711 release notes indicate that the codec will run on C674x processor, so I downloaded c64xplus_g711_2_00_000_production.exe and it unpacked itself under

          C:\Program Files (x86)\c64xplus_g711_2_00_000_production

    On the C66xx codec download page it says:

         All codecs are ELF builds, eXpressDSP compliant, and implement XDM 1.0 interfaces.
         The codec package was generated using GenCodecPkg wizard included in Codec Engine 3.xx.

    After wandering around lots of TI wiki pages and Forum pages, it seems that I need some sort of wizard in order to "consume" an XDM compliant package.  It is my impression that the "wizard" will configure the Code Composer project to locate the necessary files to build the project.

    What wizard do I need to open and build a G.711 codec package under CCSv5?  Please provide instructions on how to build any of the G.711 test applications found in c64xplus_g711_2_00_000_production using CCSv5 tools.

  • Joseph,

    I tried to reproduce your problem, first with the g711_1_12 encoder.  I ran into the same errors you did, and tried to work around them.  I eventually stopped this route, since the TestAppEncode.c was calling BCACHE APIs, which are a part of BIOS 5, and from your first post, I see that you have BIOS 6.

    So then I downloaded the 2.00.00 g711 software and attempted to build the test app for g711aenc.  With some effort, I was able to do this.  Here are the steps I did:

    1. Created an empty CCS project.

    2. Replaced main.c with g711Encodermain.c (located in g711\ti\sdo\codecs\g711aenc\app\Client\Test\Src)

    3. Added the following search paths for include files:

           ti\xdctools_3_22_04_46\packages\xdc

           ti\xdctools_3_22_04_46\packages

           g711\ti\sdo\codecs\g711aenc\app\Inc

           ti\xdais_7_21_01_07\packages\ti\xdais

    4. Added alg_malloc.c and alg_create.c (located in g711\ti\sdo\codecs\g711aenc\app\Client\Test\Src) to the project.  But when I tried to build, I got an error for a missing header file, alg.h, which I couldn't find anywhere, so I created my own.  It has these lines, and you need to add its location to the include search path:

    typedef IALG_Handle ALG_Handle;

    Content of missing alg.h:

    #ifndef ti_sdo_ce_alg_ALG_
    #define ti_sdo_ce_alg_ALG_

    #include <ialg.h>

    typedef IALG_Handle ALG_Handle;


    extern ALG_Handle ALG_create(IALG_Fxns *fxns, IALG_Handle p, IALG_Params *prms);
    extern Void ALG_delete(ALG_Handle alg);

    #endif

    5. I changed the compiler options to build elf fomat (Under C6000 Compiler -> Runtime Model Options, change coffabi to elfabi in the "Application binary interface" dropdown box)

    7. Add the codec library and path to the link options (Project Build Options -> C6000 Linker -> File Search Path)

    After doing all that, I was able to build a .out file.  I didn't try to run it, though.

    Best regards,

        Janet

  • According to the following TI wiki page:

         http://processors.wiki.ti.com/index.php?title=RTSC_Codec_And_Server_Package_Wizards

    there should be some sort of RTSC Codec Package Wizard that was used to create the packages found in c64xplus_g711_2_00_000_production. Likewise there should be some sort of RTSC Server Package Wizard to "consume" the package and enable the user to build a project with these files. The neither the Release Notes or User's Guide for g711adec, g711aenc, g711udec, or g711uenc have any instructions on which tool to use, or how to use the tool to build the test application.

    I have the following version of software tools installed:

         CCSv5 = 5.1.0.08020, BIOS = 6.32.04.49, XDCTOOLS = 3.22.03.41, XDAIS  = 7.21.01.05

    Under the Project tab in CCSv5.1, I selected  "Import Existing CCS/CCE Eclipse Project".  The tools ask you to enter a  "Select search-directory:"   Starting at:

         C:\Program FIles (x86)\c64xplus_g711_2_00_000_production

    and working my way down through each subdirectory, CCSv5 could not find a project to open. I had hoped the CCSv5.1 would have had the proper tool to recognise TI's own packaged up software, but it looks like it doesn't.  It seems like I need some sort of other wizard to prep the package before it can be used.

    So I am back to asking the same question again.  Which tool(s) do I need and what are the steps  that I have to follow so that I can create and build a test application in CCSv5 using g711 package contents found in c64xplus_g711_2_00_000_production.

  • Joseph,

    This FAQ explains the GenAlg wizard.  This wizard generates packaging needed for distributing XDM compliant algorithms:

    http://processors.wiki.ti.com/index.php/XDM_GenAlg_Wizard_FAQ

    If your codec is going to be consumed by Codec Engine, then you should use GenCodecPkg:

    http://processors.wiki.ti.com/index.php/Codec_Engine_GenCodecPkg_Wizard_FAQ

    Best regards,

        Janet

  • Hello Janet,

    You still haven't answered my question. I have already been two both wiki pages, and neither page provides enough information on how to "consume" a package.

    Likewise, on the Codec Engine wiki it says:

         "If you intend your algorithm to be consumed by Codec Engine, GenCodecPkg is recommended. If you know your algorithm will never run within the Codec Engine framework, you can use GenAlg to avoid any Codec Engine dependencies."

    When you follow the instructions under XDM_GenAlg_Wizard_FAQ (for either CCS tools or Batch File), a GUI window appears.  Your only choice is to build a package, not extract  information from a package so that you can build a project.

  • Joseph,

    One option is to include the codec header files in your source code, and link the codec library into your application.  That is how the g711 test is consuming the codec.

    Another option, if you're building a codec engine server, for example, is to add 'xdc.useModule('your codec module') to your server's configuration file.  (To do this, you would need to have used the GenCodecPkg wizard to package your codec.)  This is how your codec engine server consumes the codec.  For example, to consume the g711aenc codec in this manner, you would add the following line to your .cfg file:

        xdc.useModule('ti.sdo.codecs.g711aenc.G711AENC');

    A third option, if you're not using codec engine but still have a RTSC configuration file, you can consume your codec package by adding

        xdc.loadPackage('your codec package')

    to your configuration file.  This will cause the codec library to be linked into your application.  For example

        xdc.loadPackage('ti.sdo.codecs.g711anc');

    You can find more information on the RTSC packaging of codecs here if you are interested:

    http://processors.wiki.ti.com/index.php/XDC_packaging_an_add-on_library

    Best regards,

        Janet

  • Hello,

    I followed a footnote from your posted wiki page which led me to:

         http://rtsc.eclipse.org/docs-tip/RTSC_Packaging_Primer/Lesson_0

    This filled in one of the missing pieces to this puzzle. According to this primer, the producer of an RTSC package is responsible for providing 3 files: package.xdc, package.bld, and package.cfg.  The c64xplus_g711_2_00_00_000_production is missing the .cfg necessary to build the g711aenc package (or any of the other encoder or decoders for that matter).  I mistakenly got side tracked into thinking that the unpackaging tool created this file. It does not.

    I went back and created a new project per your instructions of July 19th. When I build the project I end up with the same error that I reported two weeks ago:

         This project does not contain a buildable RTSC Configuration (.cfg) file. In order for it to build, this project must contain one RTSC Configuration file that is not excluded from build.    g711aenc        g711aenc    TI Problem Marker

    I need assistance obtaining the missing .cfg file that should have been part of the deliverable codec package.



  • Joseph,

    I think that the g711 package contains all the necessary files.  The error message indicates that the project you are trying to build is missing a .cfg file.  This could have happened if you based your project on the SYS/BIOS hello example, and then removed the hello.cfg from your project.

    When you attempted to follow my instructions for building the test encoder (the July 19 post), did you start by creating a new Project based on an Empty CCS project (not the SYS/BIOS or Empty RTSC project)?  Here is the one I used:

    When you create this project, you should just have a main.c.  There are no .cfg files.  You should be able to build the project at this point.  Now, if you want to build the g711aenc test app (in the g711aenc 2.00.00.000 zip file)  you first replace main.c in this project with

        ti\sdo\codecs\g711aenc\app\Client\Test\Src\g711Encodermain.c

    If you attempt to build now, you will get errors such as the ones you encountered in your first post (can't find header files, etc).  You should not get a missing .cfg file error, just by replacing main.c with g711Encodermain.c  Now, you can continue with the instructions from my July 19 post, and get your project to build.  You will also need to remove the line:

    #include <_alg.h>

    from the file alg_create.c.  This file is missing, but whatever was in it did not seem to be used anyway.  This step is missing from the July 19 instructions.

    Best regards,

        Janet

  • Sorry, my picture didn't show up in the post.  I picked the "Empty Project" from the "Empty Projects" list.

    Best regards,

        Janet

  • Hello,

    Why do we want to create a vanilla Empty Project with a dummy main.c and not an Empty RTSC project?

    I created another new Empty Project as you suggested and called it "g711aenc2".  I followed your instructions and created an "alg.h" header file and placed it in the same subdirectory as the other ..\ti\xdais header files. I also commented out the reference to  "#include <_alg.h>"  in alg_create.c.   When I compiled the project I get a slew of new error messages and warnings:

    Description    Resource    Path    Location    Type
    unresolved symbol G711AENC_TII_IG711AENC, first referenced in ./g711Encodermain.obj    g711aenc2             C/C++ Problem

    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a>  unresolved symbols remain    g711aenc2             C/C++ Problem

    #10010 errors encountered during linking; "g711aenc2.out" not built    g711aenc2             C/C++ Problem

    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711aenc2    line 43    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711aenc2    line 51    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711aenc2    line 77    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 139    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 148    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 154    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 160    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 203    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 209    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 365    C/C++ Problem

    #303-D typedef name has already been declared (with same type)    g711aenc2        line 89, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 90, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 91, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 92, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 93, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 94, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 95, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 96, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem

    #10349-D creating output section ".rodata" without a SECTIONS    g711aenc2             C/C++ Problem
    #10349-D creating output section ".neardata" without a SECTIONS    g711aenc2             C/C++ Problem
    #10349-D creating output section ".fardata" without a SECTIONS    g711aenc2             C/C++ Problem
    #10321-D creating group "NEARDP_DATA" to co-locate output sections    g711aenc2             C/C++ Problem

    By the way, what are you using for the linker command file?  I am using the g711_c6455_elf.cmd that I found under ..\ti\sdo\codecs\g711aenc\app\client\build of the original unzipped package.

  • Joseph,

    Have you linked in the g711aenc library, and have you changed the compiler options to build ELF format?

    I didn't use the g711_c6455_elf.cmd file, but I think you could, and you could adjust the memory for your platform.  I think I just got some default memory map.

    Best regards,

        Janet

  • Hello,

    Yes, I have g711aenc_tii_elf.I64P in the same directory in the project as g711Encodermain.c, and yes I have changed the output format to eabi (ELF).

    Upon closer examination of the warning messages, the alg_create.c file is not seeing a header file for "_ALG_allocMemory(memTab, n)" and "_ALG_freeMemory(memTab, n)".

    Upoon closer examination of the warning messages for g711Encodermain.c, the compiler/linker doesn't know how to resolve "exit(0)'.  Likewise, it also doesn't know how to resolve the following in g711Encodermain.c: between lines 203..210:

          if ((handle =  (ISPHENC1_Handle) ALG_create (
                                          (IALG_Fxns *) &G711AENC_TII_IG711AENC,
                                          (IALG_Handle) NULL,
                                          (IALG_Params *) &params)) == NULL)
          {
            printf("Failed to Create Instance... Exiting for this configuration..\n");
            exit(1);
          }

    ALG_create() and ALG_delete() were defined in t alg.h, which is the missing file we needed to create. I put that file under c:\ti\xdais_7_21_01_05_eng\packages\ti\xdais where ialg.h and xdas.h are located.

    Finally I created my own g711_c674x.cmd, which has the same contents as g711_c6455_elf.cmd, but with the memory address map for a C674x chip. I still get all the errors that I reported yesterday.

    Attached is a zipped copy of my current project:

    7181.g711aenc2.zip

  • Joseph,

    I was able to build your project after adding a few directories to the the include search path, and the encoder library and path to the project.  Here is a list of what I did to get it to build (note that you have already done some of these steps, but since I have xdctools, xdais, etc in different directories, I had to add my directories to the projects include and library search paths.

    I imported the project from the zip file you posted, and tried to build.

    First error:

    "../g711Encodermain.c", line 14: fatal error #5: could not open source file "std.h"
    1 fatal error detected in the compilation of "../g711Encodermain.c".
    Compilation terminated.

    -- Add   <XDC_INSTALL_DIR>/packages/xdc   to include file search path

    Rebuilt project and got this error:

    "C:/ti/xdctools_3_22_04_46/packages/xdc/std.h", line 71: fatal error #5: could not open source file "ti/targets/select.h"
    1 fatal error detected in the compilation of "../g711Encodermain.c".
    Compilation terminated.

    -- Add   <XDC_INSTALL_DIR>/packages   to include file search path

    Next error:

    "../g711Encodermain.c", line 16: fatal error #5: could not open source file "g711aenc_tii.h"
    1 fatal error detected in the compilation of "../g711Encodermain.c".
    Compilation terminated.

    -- Add   <G711_DIR>/ti/sdo/codecs/g711aenc/app/Inc   to include file search path

    Next error:

    "I:\jeh\docs\support\g711\ti\sdo\codecs\g711aenc\app\Inc\isphenc1.h", line 27: fatal error #5: could not open source file "xdas.h"
    1 fatal error detected in the compilation of "../g711Encodermain.c".

    -- Add   <XDAIS_INSTALL_DIR>/packages/ti/xdais   to include file search path

    Next error:
    "../alg_malloc.c", line 37: fatal error #5: could not open source file "alg.h"
    1 fatal error detected in the compilation of "../alg_malloc.c".
    Compilation terminated.

    -- Add an alg.h to project and   I:\jeh\docs\support\g711\Joseph Z's project\g711aenc2   to include search path

    Next error:

    warning #10349-D: creating output section ".rodata" without a SECTIONS
       specification.  For additional information on this section, please see the
       'C6000 EABI Migration' guide at
       http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_
       EABI_Sections
    warning #10321-D: creating group "NEARDP_DATA" to co-locate output sections
       .neardata and .rodata with .bss

     undefined              first referenced     
      symbol                    in file          
     ---------              ----------------     
     G711AENC_TII_IG711AENC ./g711Encodermain.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "g711aenc2.out" not built

    -- Add library  "I:\jeh\docs\support\g711\ti\sdo\codecs\g711aenc\lib\g711aenc_tii_elf.l64P"

    and library search path:  "I:\jeh\docs\support\g711\ti\sdo\codecs\g711aenc\lib"   to project.

    After that, I was able to build the .out (still plenty of warnings, though).  The _ALG_allocMemory() and _ALG_freeMemory() functions must have been defined in the missing _alg.h file.

    Are these the errors you were also seeing?

    Best regards,

        Janet




  • Hello,

    I haven't seen the first five compilation errors that you listed in your posting. I believe that they were caused by difference in our tool chain paths, which in turn affect our respective include paths, i.e.

    "${CG_TOOL_ROOT}/include"
    "C:/ti/xdctools_3_22_03_41/packages"
    "C:/ti/xdctools_3_22_03_41/packages/xdc"
    "C:/ti/xdais_7_21_01_05_eng/packages/ti/xdais"
    "C:\Program Files (x86)\c64xplus_g711_2_00_00_000_production\c64xplus_g711adec_2_00_00_000_production\ti\sdo\codecs\g711adec\app\Inc"

    As an aside, I did a search on my hard drive and I located two different versions of "alg.h" and "_alg.h".  At some point when I was installing software for my OMAP-L137 board, I downloaded the C674x_dsp_1_00_00_11 archive, which included  subdirectories for "framework_components_2_23_01"  and "codec_engine_2_23_01". Each subdirectory  had it's own version of "alg.h" and "_alg.h".  I copied the version of these files from "framework_components_2_23_01" and placed them under  "C:/ti/xdais_7_21_01_05_eng/packages/ti/xdais".  I restored the reference to "#include <_alg.h>" in "alg_create.c" and recompiled my project. That resolved the problem with _ALG_allocMemory() and _ALG_freeMemory() functions, but still left me with the other errors that I reported earlier.

    Another interesting thing to point out is that all the functions found in  "alg.h"  under   "codec_engine_2_23_01"  have an additional function parameter "groupId" of type "Int",  i.e.

         extern ALG_Handle ALG_create(IALG_Fxns *fxns, IALG_Handle p, IALG_Params *prms);

    versus

         extern ALG_Handle ALG_create(Int groupId, IALG_Fxns *fxns, IALG_Handle p, IALG_Params *prms);

    Over the past 3 or 4 years we have seen the XDM interface evolve from version 0.9 to version 1.0 to version 1.1. For some reason which I can not fathom, the header files alg.h and _alg.h have never been  located under the  "ti\xdais_<version>\packages\ti\xdias" subdirectory where other files such as "ialg.h" are stored.  As a software developer trying to use TI's codec library or volib library, I don't see how we can ever get these libraries to compile and link if we don't have the correct header files installed under the correct tool chain.



  • Joseph,

    The header files alg.h and _alg.h are not part of the xdais product.  The G711 encoder test has its own alg.h and _alg.h, which should have been included with the test, but are missing.  These header files are not the same as the ones used in framework components or codec engine.  The contents of the alg.h that I posted earlier is what you need to build the test. It's probably better to place this alg.h in the test directory, rather than under xdais, since it is specific to the test.

    Are you still getting the linker error, unresolved symbol G711AENC_TII_IG711AENC, or is there some other error?

    Best regards,

        Janet

  • Hello,

    If I don't use the "_alg.h" obtained from somewhere else, then we to create one to resolve the problem with the missing _ALG_allocMemory() and _ALG_freeMemory() functions.

    The following are the error and warning messages that I am still seeing:

    Description    Resource    Path    Location    Type
    #10010 errors encountered during linking; "g711aenc2.out" not built    g711aenc2             C/C++ Problem

    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/10234.html">#10234-D</a>  unresolved symbols remain    g711aenc2             C/C++ Problem
    unresolved symbol G711AENC_TII_IG711AENC, first referenced in ./g711Encodermain.obj    g711aenc2             C/C++ Problem

    #10321-D creating group "NEARDP_DATA" to co-locate output sections    g711aenc2             C/C++ Problem
    #10349-D creating output section ".fardata" without a SECTIONS    g711aenc2             C/C++ Problem
    #10349-D creating output section ".neardata" without a SECTIONS    g711aenc2             C/C++ Problem
    #10349-D creating output section ".rodata" without a SECTIONS    g711aenc2             C/C++ Problem

    #303-D typedef name has already been declared (with same type)    g711aenc2        line 89, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 90, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 91, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 92, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 93, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 94, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 95, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem
    #303-D typedef name has already been declared (with same type)    g711aenc2        line 96, external location: C:\ti\xdctools_3_22_03_41\packages\xdc\std.h    C/C++ Problem

    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 139    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 148    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 154    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 160    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 203    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 209    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711aenc2    line 365    C/C++ Problem

  • Joseph,

    Did you add the g711 library to your project?  The zipped up project that you posted yesterday did not have that library.  You need to add the library and the search path to the project link options.  In CCS, open your project Build Options, and then go to:

        Build -> C6000 Linker -> File Search Path

    This is what I did:

  • Sorry, but I don't know why my screen shot wasn't uploaded.  It showed both the library in the upper box, and the path to it in the lower box.

    Best regards,

        Janet

  • Hello,

    After adding the file search path to the project to locate g711aenc_tii_elf.l64P, it resolved the missing symbol G711AENC_TII_IG711AENC.  There are no further errors preventing g711aenc3.out from being produced, but there still are 23 warning message that I reported earlier.

    I would like to try and run the test application on the TI software simulator, but the question next becomes which one?  Under

         General -> Build Options ->  Variant:

    I have "Generic C674x Device" selected.  Should it be "Generic C64x+ Device" instead to run the codec library?

    Likewise under

        General -> Build Options -> Advanced Settings -> Rutime support library:

    I have "<automatic>"  choice selected.  When I looked at g711aenc2.map, the  "rts6740_elf.lib"  was chosen as the runtime support library.  Should I explicitly select "rts64plus_elf.lib"  instead?

    Finally, under

         Project -> New -> Target  -> Texas Instrument Simulator

    I selected "C674x CPU Cycle Accurate SImulator, Little Endian".  Should it be "C64x+ CPU Cycle Accurate Simulator, Little Endian"?

  • Joseph,

    I could create CCSv5 projects for G711, based on version 2_00_00 downloaded from TI website, and I could build and run them on C6747 Device simulator for the sample test vector available.

    Please find attached the archive for your reference. The project files are available @ \app\Client\Build\Encoder (Decoder).

    I have used the following tools set and Build Variables to set, you may need to update these Build Variables if you are using dufferent tool set.

    BIOS_INSTALL_DIR=C:\CCSV5\bios_6_31_00_18

    XDCROOT=C:\CCSV5\xdctools_3_20_08_88

    FRMWORKROOT=C:\CCSV5\framework_components_3_20_02_29

    To change these variables, Import the CCS project, Right click on the project and Select "Build Options". Select "Build" Tab. You can find the above variables under "Build Variables". Click Edit and Modify according to your PATHs. If you have the above tools installed at C:\CCSv5, no need to make any changes, the projects should build as is and work for you.

    Let me know if you have any difficulties or questions.

    Thanks,

    Venkat2867.c64xplus_g711_2_00_00_000_production.zip

  • after some trials i was able to build the code,but still i am getting some errors can u pls look into it and suggest any solution.

    when i tried to run the code i am getting this error,

    [C674X_0] Testing G.711 Encoder
    [C674X_0]
    [C674X_0] Error in opening input file list

    warnings:

    Description    Resource    Path    Location    Type
    #10321-D creating group "NEARDP_DATA" to co-locate output sections .neardata and .rodata with .bss    g711a_encoder             C/C++ Problem
    #10349-D creating output section ".fardata" without a SECTIONS specification.  For additional information on this section, please see the 'C6000 EABI Migration' guide at http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_ EABI_Sections    g711a_encoder             C/C++ Problem
    #10349-D creating output section ".neardata" without a SECTIONS specification.  For additional information on this section, please see the 'C6000 EABI Migration' guide at http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_ EABI_Sections    g711a_encoder             C/C++ Problem
    #10349-D creating output section ".rodata" without a SECTIONS specification.  For additional information on this section, please see the 'C6000 EABI Migration' guide at http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_ EABI_Sections    g711a_encoder             C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711a_encoder    line 43    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711a_encoder    line 51    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711a_encoder    line 77    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711a_encoder    line 139    C/C++ Problem

     i am getting problem near the exit(0); in lines 139,148 in g711encodermain.c and other error in line 43 i n the alg_create.c

    please revert back asap.

  • Hi joseph,

    can u please post ur compiled file here, i am getting error

    [C674X_0] Testing G.711 Encoder
    [C674X_0]
    [C674X_0] Error in opening input file list

    warnings:

    Description    Resource    Path    Location    Type
    #10321-D creating group "NEARDP_DATA" to co-locate output sections .neardata and .rodata with .bss    g711a_encoder             C/C++ Problem
    #10349-D creating output section ".fardata" without a SECTIONS specification.  For additional information on this section, please see the 'C6000 EABI Migration' guide at http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_ EABI_Sections    g711a_encoder             C/C++ Problem
    #10349-D creating output section ".neardata" without a SECTIONS specification.  For additional information on this section, please see the 'C6000 EABI Migration' guide at http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_ EABI_Sections    g711a_encoder             C/C++ Problem
    #10349-D creating output section ".rodata" without a SECTIONS specification.  For additional information on this section, please see the 'C6000 EABI Migration' guide at http://processors.wiki.ti.com/index.php/C6000_EABI:C6000_EABI_Migration#C6x_ EABI_Sections    g711a_encoder             C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711a_encoder    line 43    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711a_encoder    line 51    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    alg_create.c    /g711a_encoder    line 77    C/C++ Problem
    <a href="file:/C:/ti/ccsv5/tools/compiler/dmed/HTML/225.html">#225-D</a>  function declared implicitly    g711Encodermain.c    /g711a_encoder    line 139    C/C++ Problem
     

    can u suggest any solution?

  • Hello lenin,

    I am not a TI employee, but I can offer a few suggestions.

    1.  When you created your project, did you specify that the output format of the build is "eabi (ELF)" and not "Legacy COFF" format? The G.711 library that you are linking with is ELF format.

    2. What are you using for your linker command file?  The g711_c6455_elf.cmd  file that is packaged with the test application might not match the memory map of your target platform.  I had to create my own .cmd file to match the target DSP chip on my EVM board.

  • Hi Joseph,

    Thanks for the reply.

    I have specified the output format as "eabi" by seeing the earlier posts.

    The library i am using is "g711aenc_tii_elf.l64p".

    I tried to make my own cmd file but still i find same errors.

    [C674X_0] Testing G.711 Encoder
    [C674X_0]
    [C674X_0] Error in opening input file
    [C674X_0] All input Files processed

    when i tried to run the program i get the following error:

    No source available for "C$$EXIT() at C:\Documents and Settings\lenin\workspace_v5_2\g711a_encoder\Debug\g711a_encoder.out:{3} 0x8000bda0{4}"

  • Hello,

    Inside g711Encodermain.c, the file that you are trying to open has a relative path, i.e.

           if(!(finList = fopen("..\\..\\..\\testvecs\\G711EncInpFileList_std.dat", "r")))

    Likewise, the contents of G711EncInpFileList_std.dat has two files listed with relative paths, i.e.

         ..\\..\\..\\Test\\Testvecs\\alaw\\input_alaw.pcm
         ..\\..\\..\\Test\\Testvecs\\alaw\\alaw.bit

    I ended up copying these files into the \Debug subdirectory of my project, and eliminated the relative path portion of these files. That should fix the error message about not being able to open up the input file.



  • Hi Joseph,

    Thanks for the reply.

    But i didn't get you,do you want me to completely remove the path in the program or just change it.

    The G711 folder downloaded i don't see any file "G711EncInpFileList_std.dat" but instead i have a folder named "alaw",which consists of two files "alaw.bit"&"input_alaw.pcm".

    I changed the path in the encodermain.c program but still i face same error.

  • Hello,

    I edited lines 130 and 136 of g711Encodermain.c to:

           if(!(finList = fopen("G711EncInpFileList.dat", "r")))

    I edited the contents of G711EncInpFileList.dat as follows:

    1
    input_alaw.pcm
    alaw.bit

    Finally, I placed a copy of G711EncInpFileList.dat, input_alaw.pcm, and alaw.bit at the same directory level as g711Encodermain.c. I also placed a copy of these 3 files in the \Debug subdirectory of the project, and the project ran for me without any more file open errors.




  • Hi Joseph,

    I have tried the changes suggested by you but still i am getting same error.

    can you post your final working codec here.

    Also pls let me know how you solved the error with std.h file.

    I have included  std.h header file in my project but i am getting the below error.

    Description    Resource    Path    Location    Type
    #35 #error xdc_target_types__ must be defined to name a target-specific header containing definitions of xdc_Int8, xdc_Int16, ...

        can you suggest any solution.

  • The file std.h is located in a subdirectory where your xdctools are installed.

    Add   <XDC_INSTALL_DIR>/packages/xdc   to the include file search path for the project.

  • Hi joseph thanks a lot, i was able to run the program successfully.

    output:

    [C674X_0] Testing G.711 Encoder
    [C674X_0]
    [C674X_0] Started Encoding ITU Test Case input_alaw.pcm...
    [C674X_0] Creating Algorithm Instance...
    [C674X_0] Algorithm Instance Creation Done...
    [C674X_0] Started...
    [C674X_0] ...10
    [C674X_0] ...20
    [C674X_0] ...30
    ......
    ......
    ......
    [C674X_0] ...820
    [C674X_0] PASSED ITU-T testvector : Total 820 frames
    [C674X_0] All input Files processed

    after this  i am getting an error("C$$EXIT() at C:\Documents and Settings\lenin\workspace_v5_2\g711a_encoder\Debug\g711a_encoder.out:{3} 0x8000bda0{4}") which i have posted earlier also.can you suggest anything for this?

    Do you have any code for linear pcm to a-law &u-law conversion?

  • Assuming that you have 16-bit linear PCM samples, for A-law you need to:

        *  shift PCM samples to the right by 3 bits prior to encoding them (i.e. rescale down to 13 bits)

        *  shift the decoder output left by 3 bits to return the data to 16-bit PCM samples.

    For U-law you need to:

        *  shift PCM samples to the right by 2 prior to encoding them (i.e. rescale down to 14 bits)

        *  shift the decoder output left by 2 bits to return the data to 16-bit PCM samples.

  • Hi Joseph,

    do you have code for G729 implementation?

  • The G.711 and G.722 codec patent license has expired and the libraries are offered free at TI.  The G.729 codec is not free. You have to pay for the library code and pay a licensing fee on top of that.