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.

Attaching a CCS v3.3 .c file into a codec



Hi,

I had created a codec based on the iuniversal instructions found here.

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

I would like to import a .c file which was previously used on CCS v3.3 into the codec.

The codec will call this .c file. I have no problem compiling the codec. However, there is an error when i compile the server. The server mention that the .c file name was not found.

Am i supposed to create a new codec using the CCS v3.3 .c file?

My intention is to use the codec to call several function in the .c file. Please advise if this is possible.

Thanks

  • There could be delays due to the end year holidays in repying to your query.

    regards

    Yashwant

  • Hi Amy,

    Given a .c file, you can either compile it into your codec library file, or bundle it with your server executable file. Is this your own codec library that you built on your own? If so building the .c file into the codec library might be the simplest. Then you can simply re-run the GenCodecPkg (http://processors.wiki.ti.com/index.php/Codec_Engine_GenCodecPkg_Wizard_FAQ) and GenServer wizards (http://processors.wiki.ti.com/index.php/Codec_Engine_GenServer_Wizard_FAQ) on the new library and you are done.

    If you do not have the option of bundling the file with the codec library, another option is to bundle it into your server executable when it is built, and I am assuming that is what you have been trying to do. To make sure the .c file is compiled as part of the executable, you need to put a copy of the file next to the "main.c" file in the server's directory. Then modify package.bld and look for a line similar to this one:

        Pkg.addExecutable("bin/" + serverName, targ, "ti.platforms.evm3530",
            {
    //            tcopts: "-Dxdc.cfg.check.fatal=false",
                cfgScript: "server.tcf",
                lopts: "-l link.cmd",
            }).
            addObjects( [
                "main.c",
            ] );

    You need to expand the array passed to the addObjects function call to include your file, e.g.

        Pkg.addExecutable("bin/" + serverName, targ, "ti.platforms.evm3530",
            {
    //            tcopts: "-Dxdc.cfg.check.fatal=false",
                cfgScript: "server.tcf",
                lopts: "-l link.cmd",
            }).
            addObjects( [
                "main.c",

                "my_c_file.c",
            ] );

    Then rebuild your server executable:

    gmake all

    More details on the genServer wizard can be found at http://processors.wiki.ti.com/index.php/Codec_Engine_GenServer_Wizard_FAQ

    Best regards,

    Vincent

  • Hi,

    Thanks for the reply.

    I managed to do it using the 2nd method.

    Can i check if it is possible to do a printf inside the .c? Or any other method to debug? Maybe trace?

    Thanks

  • Hi Amy,

    If you want to do debugging of the DSP code, you would need to attach to it using CCS. There is an article here about how to do so:

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

    After attaching to the processor, your printf's should appear in CCS.

    Best regards,

    Vincent