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.

Linker/compiler options for XDAIS Rule 8

Hi,

My algorithm is not qualified by QualiTI (XDAIS Rule 8 - Namespace compliance):

Test failed. Problem: Not all global symbols defined by the module have the "IRCOMP_HEXIUM_" prefix (i.e. module_vendor_).

This because, there are several C functions in separate source files.
These functions are locals in the library and they will be never call from the outside (e.g. by an application).
But, I cannot use "static" keyword because these are placed in separate files.

I tried the "#pragma FUNC_NO_GLOBAL_ASG(func)" but it won't help.

How can I link my internal functions as library-local?

Best regards,
Peter

PS: Tools versions:
CCS: 5.3.0.00090
XDC: 3.24.05.48
CGT C6K: 7.4.1
XDAIS: 7.21.01.07
QualiTI: 7.20

  • Hi Peter,

    This rule mandates to have module prefix for every function so that there will not be any symbol clashes while integrating with application. Even though these functions are not called by application there is a chance other module/diffrent flavours of same module can have same function name.

    So it is better to add module prefix. If still insist on suppressing this error, you can add exception in "Rules8_9_10.xs" under "allowedFxns". File is present at : xdais_7_21_01_07\packages\ti\xdais\qualiti

    Regards

    Rama

  • Hi Rama,

    Thank you for your answer.

    I think, suggested method (inserting function names into Rules8_9_10.xs) is not good for me because my algorithm has many (even hundreds of files) algorithm-local but placed in separate source files which are unfortunate "public" now in the final algorithm library (archive output file).

    If I would follow your instruction, I had to insert all my function names of all my source files of all my algorithm projects into the build system script file (and not into the project-specific configuration).

    I think it must be another way, that is:
    - project-specific;
    - allow to use many separate source files in an algorithm;
    - not a suppression of XDAIS Rule warning/error;
    - keep to conform with all other XDAIS rules;

    Otherwise, I found some linker options (e.g. -h, --globalize, -g, ...) for my problem here and here but building of my (genAlg generated) project run compiler (cl6x) and archiver (ar6x) only, but not the linker (lnk6x).

    My question is:
    How can I run linker (performing linker options) in this XDM based configuration?, or
    How can I set my project building options for assembling several source files into an archive (.a64P) reaching my goal: having only XDAIS compliant public symbols only in the library file (CCS5).

    Best regards,
    Peter

    PS:

    1.
    Due to some upgrading process, current tools versions:
    CCS: 5.3.0.00090
    XDC: 3.24.05.48
    CGT C6K: 7.4.2
    XDAIS: 7.23.00.06
    QualiTI: 7.20
    FC: 2.26.00.01

    2.
    I attached an example project included a separate source file module.c.
    4857.example_universal_alg.zip

  • Hi Peter,

    You use can use linker for algorithm project at post build setup. you can set post build batch file as below and run after building the project.

    @echo off

    echo. > temp_postBuildStep.bat

    echo del xxxvenc_alg.o66 ..\..\..\..\Lib\xxxvenc_ti.le66 >> temp_postBuildStep.bat
    echo %CG_TOOL_ROOT%\bin\lnk6x -o xxxvenc_alg.o66 -m ..\..\..\..\Lib\xxxvenc_ti.map ..\Obj\*.obj ..\xxxvenc_ti_alg.cmd>> temp_postBuildStep.bat
    echo %CG_TOOL_ROOT%\bin\ar6x -r ..\..\..\..\Lib\xxxvenc_ti.le66 xxxvenc_alg.o66 >> temp_postBuildStep.bat
    call temp_postBuildStep.bat
    REM del temp_postBuildStep.bat

    xxxvenc_ti_alg.cmd content can be as below.

    /* Make relocatable object */
    -r

    /* Hide all symbols in this partial link */
    -h

    /* Make XDAIS Functions and Tables Symbols Globally Visible */
    -g XXX_PARAMS
    -g XXXVENC_TI_DYNAMICPARAMS
    -g XXXVENC_TI_IALG /* module ID */
    -g XXXVENC_TI_activate /* activate */
    -g XXXVENC_TI_alloc /* algAlloc */
    -g XXXVENC_TI_deactivate /* deactivate */

    SECTIONS

    {

    .const

    {
    *(.const)
    }

    .text:XXXVENC_TI_uSect_Frame_IPB
    {
    /* Frame Level*/
    .= align(0x4000); /* align to 16kb */
    *(.text:XXXV)

    }


    }

    .

  • Dear Rama,

    Thank you for your answer, I am thinking in a solution similar yours.

    But I don't know how can I configure the proper post build process.
    Inserting it into my makefile (after calling xdc, so after finishing the build) it seems not too good.

    My (genAlg generated) building process which is based on gmake is:
    (attached building log:

    1220.build.log
    11:10:23 **** Build of project hexium.ircomp ****
    "C:\\ti\\xdctools_3_24_05_48\\gmake" 
    echo [Building...]
    [Building...]
    "C:/TI/xdctools_3_24_05_48/xdc" XDCOPTIONS=v XDCARGS="CGTOOLS_C64P=\"C:/TI/ccsv5/tools/compiler/c6000_7.4.2\"" --xdcpath="C:/TI/xdais_7_23_00_06/packages" release
    #
    # making package.mak (because of package.bld) ...
    C:/TI/xdctools_3_24_05_48/xs  -Dxdc.path="C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../.." -Dxdc.root=C:/TI/xdctools_3_24_05_48 -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../..;C:/TI/xdctools_3_24_05_48;C:/TI/xdctools_3_24_05_48/etc" -Dxdc.bld.targets="" -DTOOLS=   -f C:/TI/xdctools_3_24_05_48/packages/xdc/bld/bld.js ./config.bld package.bld package.mak CGTOOLS_C64P="C:/TI/ccsv5/tools/compiler/c6000_7.4.2"
    #
    # generating interfaces for package hexium.ircomp (because package/package.xdc.inc is older than package.xdc) ...
    C:/TI/xdctools_3_24_05_48/xs -Dxdc.path="C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../.." -Dxdc.root=C:/TI/xdctools_3_24_05_48 -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../..;C:/TI/xdctools_3_24_05_48;C:/TI/xdctools_3_24_05_48/etc" -Dxdc.bld.targets="" -DTOOLS=  -f xdc/services/intern/cmd/build.xs  -m package/package.xdc.dep -i package/package.xdc.inc package.xdc
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/debug/ircomp/package/package_hexium.ircomp.o64P
    #
    # cl64P package/package_hexium.ircomp.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp/package -fr=./package/lib/lib/debug/ircomp/package -fc package/package_hexium.ircomp.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/debug/ircomp/package/package_hexium.ircomp.o64P.dep -p package/lib/lib/debug/ircomp/package -s o64P package/package_hexium.ircomp.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp/package -fr=./package/lib/lib/debug/ircomp/package
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/debug/ircomp/ircomp.o64P
    #
    # cl64P ircomp.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp -fr=./package/lib/lib/debug/ircomp -fc ircomp.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/debug/ircomp/ircomp.o64P.dep -p package/lib/lib/debug/ircomp -s o64P ircomp.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp -fr=./package/lib/lib/debug/ircomp
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/debug/ircomp/ircomp_hexium_ires.o64P
    #
    # cl64P ircomp_hexium_ires.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp -fr=./package/lib/lib/debug/ircomp -fc ircomp_hexium_ires.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/debug/ircomp/ircomp_hexium_ires.o64P.dep -p package/lib/lib/debug/ircomp -s o64P ircomp_hexium_ires.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp -fr=./package/lib/lib/debug/ircomp
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/debug/ircomp/module.o64P
    #
    # cl64P module.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp -fr=./package/lib/lib/debug/ircomp -fc module.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/debug/ircomp/module.o64P.dep -p package/lib/lib/debug/ircomp -s o64P module.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -D_DEBUG_=1 -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_debug -Dxdc_bld__vers_1_0_7_4_2 --symdebug:dwarf  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/debug/ircomp -fr=./package/lib/lib/debug/ircomp
    C:/TI/xdctools_3_24_05_48/bin/rm -f lib/debug/ircomp.a64P
    #
    # archiving package/lib/lib/debug/ircomp/package/package_hexium.ircomp.o64P package/lib/lib/debug/ircomp/ircomp.o64P package/lib/lib/debug/ircomp/ircomp_hexium_ires.o64P package/lib/lib/debug/ircomp/module.o64P into lib/debug/ircomp.a64P ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/ar6x  rq lib/debug/ircomp.a64P   package/lib/lib/debug/ircomp/package/package_hexium.ircomp.o64P package/lib/lib/debug/ircomp/ircomp.o64P package/lib/lib/debug/ircomp/ircomp_hexium_ires.o64P package/lib/lib/debug/ircomp/module.o64P 
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/release/ircomp/package/package_hexium.ircomp.o64P
    #
    # cl64P package/package_hexium.ircomp.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp/package -fr=./package/lib/lib/release/ircomp/package -fc package/package_hexium.ircomp.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/release/ircomp/package/package_hexium.ircomp.o64P.dep -p package/lib/lib/release/ircomp/package -s o64P package/package_hexium.ircomp.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp/package -fr=./package/lib/lib/release/ircomp/package
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/release/ircomp/ircomp.o64P
    #
    # cl64P ircomp.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp -fr=./package/lib/lib/release/ircomp -fc ircomp.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/release/ircomp/ircomp.o64P.dep -p package/lib/lib/release/ircomp -s o64P ircomp.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp -fr=./package/lib/lib/release/ircomp
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/release/ircomp/ircomp_hexium_ires.o64P
    #
    # cl64P ircomp_hexium_ires.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp -fr=./package/lib/lib/release/ircomp -fc ircomp_hexium_ires.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/release/ircomp/ircomp_hexium_ires.o64P.dep -p package/lib/lib/release/ircomp -s o64P ircomp_hexium_ires.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp -fr=./package/lib/lib/release/ircomp
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/lib/lib/release/ircomp/module.o64P
    #
    # cl64P module.c ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/cl6x -c  -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp -fr=./package/lib/lib/release/ircomp -fc module.c
    C:/TI/xdctools_3_24_05_48/bin/mkdep -a package/lib/lib/release/ircomp/module.o64P.dep -p package/lib/lib/release/ircomp -s o64P module.c -C   -qq -pdsw225 -mv64p -eo.o64P -ea.s64P -mi10 -mo  -Dxdc_target_name__=C64P -Dxdc_target_types__=ti/targets/std.h -Dxdc_bld__profile_release -Dxdc_bld__vers_1_0_7_4_2 -O2  -I. -IC:/TI/xdais_7_23_00_06/packages -IC:/TI/xdctools_3_24_05_48/packages -I../.. -IC:/TI/ccsv5/tools/compiler/c6000_7.4.2/include -fs=./package/lib/lib/release/ircomp -fr=./package/lib/lib/release/ircomp
    C:/TI/xdctools_3_24_05_48/bin/rm -f lib/release/ircomp.a64P
    #
    # archiving package/lib/lib/release/ircomp/package/package_hexium.ircomp.o64P package/lib/lib/release/ircomp/ircomp.o64P package/lib/lib/release/ircomp/ircomp_hexium_ires.o64P package/lib/lib/release/ircomp/module.o64P into lib/release/ircomp.a64P ...
    C:/TI/ccsv5/tools/compiler/c6000_7.4.2/bin/ar6x  rq lib/release/ircomp.a64P   package/lib/lib/release/ircomp/package/package_hexium.ircomp.o64P package/lib/lib/release/ircomp/ircomp.o64P package/lib/lib/release/ircomp/ircomp_hexium_ires.o64P package/lib/lib/release/ircomp/module.o64P 
    #
    # all files complete.
    #
    # generating external release references package/rel/hexium_ircomp/hexium/ircomp/package/package.rel.xml ...
    C:/TI/xdctools_3_24_05_48/xs -Dxdc.path="C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../.." -Dxdc.root=C:/TI/xdctools_3_24_05_48 -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../..;C:/TI/xdctools_3_24_05_48;C:/TI/xdctools_3_24_05_48/etc" -Dxdc.bld.targets="" -DTOOLS=  -f C:/TI/xdctools_3_24_05_48/packages/xdc/bld/rel.js  . package/rel/hexium_ircomp/hexium/ircomp/package/package.rel.xml
    #
    # generating schema include file list ...
    C:/TI/xdctools_3_24_05_48/xs -Dxdc.path="C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../.." -Dxdc.root=C:/TI/xdctools_3_24_05_48 -Dxdc.hostOS=Windows -Dconfig.importPath=".;C:/TI/xdais_7_23_00_06/packages;C:/TI/xdctools_3_24_05_48/packages;../..;C:/TI/xdctools_3_24_05_48;C:/TI/xdctools_3_24_05_48/etc" -Dxdc.bld.targets="" -DTOOLS=  -f C:/TI/xdctools_3_24_05_48/packages/xdc/cfg/cfginc.js hexium.ircomp package/package.cfg.xdc.inc
    #
    # making release file hexium_ircomp.zip (because of package/rel/hexium_ircomp.xdc.inc) ...
    C:/TI/xdctools_3_24_05_48/bin/rm -f hexium_ircomp.zip
    C:/TI/xdctools_3_24_05_48/bin/rm -f package/rel/hexium_ircomp.xdc.inc.manifest
    C:/TI/xdctools_3_24_05_48/bin/rm -f hexium_ircomp.zip
    C:/TI/xdctools_3_24_05_48/bin/fixlist -z  -Xi package/rel/hexium_ircomp.xdc.inc hexium/ircomp package/rel/hexium_ircomp.xdc.inc.manifest hexium_ircomp.zip package/rel/hexium_ircomp.zip.dep
    cd ../..;C:/TI/xdctools_3_24_05_48/bin/zip hexium/ircomp/hexium_ircomp.zip -q -r . -i@hexium/ircomp/package/rel/hexium_ircomp.xdc.inc.manifest
    C:/TI/xdctools_3_24_05_48/bin/touch package/rel/hexium_ircomp/hexium/ircomp/package/package.rel.xml
    cd package/rel/hexium_ircomp; C:/TI/xdctools_3_24_05_48/bin/zip ../../../hexium_ircomp.zip -q -u hexium/ircomp/package/package.rel.xml
    C:/TI/xdctools_3_24_05_48/bin/xdcenv  -i .xdcenv.mak
    rem postBuild.bat
    
    11:10:47 Build Finished (took 23s.716ms)
    
    
    )

    1. CONFIGURATION:
    1.1. # making package.mak (because of package.bld)
    1.2. # generating interfaces for package hexium.ircomp
    2. MAKING DEBUG:
    2.2. # cl64P package/package_hexium.ircomp.c ...
    2.3. # cl64P ircomp.c ...
    2.4. # cl64P ircomp_hexium_ires.c ...
    2.5. # cl64P module.c ...
    2.6. # archiving package/lib/lib/debug/ircomp/package/package_hexium.ircomp.o64P package/lib/lib/debug/ircomp/ircomp.o64P package/lib/lib/debug/ircomp/ircomp_hexium_ires.o64P package/lib/lib/debug/ircomp/module.o64P into lib/debug/ircomp.a64P ...
    3. MAKING RELEASE:
    3.1. # cl64P package/package_hexium.ircomp.c ...
    3.2. # cl64P ircomp.c ...
    3.3. # cl64P ircomp_hexium_ires.c ...
    3.4. # cl64P module.c ...
    3.5. # archiving package/lib/lib/release/ircomp/package/package_hexium.ircomp.o64P package/lib/lib/release/ircomp/ircomp.o64P package/lib/lib/release/ircomp/ircomp_hexium_ires.o64P package/lib/lib/release/ircomp/module.o64P into lib/release/ircomp.a64P ...
    4. PACKAGING + ZIP:
    4.1. # generating external release references package/rel/hexium_ircomp/hexium/ircomp/package/package.rel.xml ...
    4.2. # generating schema include file list ...
    4.3. # making release file hexium_ircomp.zip (because of package/rel/hexium_ircomp.xdc.inc) ...

    If I insert calling post-build batch into my makefile:
    - it is run only one time after whole (debug+release) compilation;
    - there is unnecessary to run original archiver (in 2.6 and 3.6) and to delete .a64P archive file (in post-build batch);
    - the final release package does not contain the good (very final) archive file (.a64P);

    I think, for proper compilation and packaging the release, I should:
    - call linker within/by xdc (between steps 2.5 and 2.6 for debug, and between steps 3.5 and 3.6 for release), then
    - call archiver (using another configuration) in step 2.6 and 3.6.

    I think, I should modify my config.bld and/or package.bld for that.

    Can you help me that how I can do that?
    (I am not too familiar in xdc configuration files)

    Peter

  • Peter,
    I think target filters would work for you: http://rtsc.eclipse.org/cdoc-tip/xdc/bld/ITargetFilter.html. They allow you to intercept any command line generated by XDCtools, and change it, or replace it with other command lines created dynamically. I'll need some more time to create an example for you, because it is fairly advanced XDCtools topic.

    This will require changes in your config.bld, which is I think automatically generated. I am not familiar with genAlg, but I think once config.bld is generated you can change at will and your changes are not overwritten.

  • Peter,
    I have a small example that demonstrates how to create an ITargetFilter, and how to use it. It is not a complete solution for your problem, but it sets up the basic elements that you need to tweak. I am not sure how familiar you are with JavaScript and XDCtools, so it could look complicated but I couldn't figure out anything simpler. 

    First you need a package that will contain your target filter module. The name of the package could be target.filters and the module is Simple. You need an empty package.bld file, then package.xdc file that declares modules, and in your case the content of the file would be:
    package target.filters {
        module Simple;
    }

    Then you need a file Simple.xdc that simply declares that your module Simple inherits the interface ITargetFilter.
    metaonly module Simple inherits xdc.bld.ITargetFilter
    {
    }

    Finally, the real work is done in Simple.xs. You only need to define the function archive(). That function is invoked whenever a target generates an command line for the archiver. In your function archive you can intercept that call and change the content of the command line. The command line is in the parameter res.cmds. You can follow the link from my earlier post, and learn more about all the parameters that are passed to archive(). All I do here is to add the command 'ls' to precede the archiver command line. You will probably need to do something similar and also to change the content of res.cmds. res.cmds is a string so your best bet is to use standard JavaString APIs for string manipulation:
    function archive(container, lib, objList, archArgs, res)
    {
        res.cmds = "ls\n" + res.cmds;
    }

    Once you finish all these files you need to run the command 'xdc' in that directory to create the package.

    Now, to use your new package you need to have that package in your package path. As I don't know the details of your build, I can't tell exactly where to make that change, but somewhere in some makefile you are probably defining XDCPATH. You need to add to your XDCPATH the directory that contains 'target' directory, where your package target.filters is located. Once you fix your XDCPATH, you need to change config.bld. This is how I modified my config.bld to add the filter to my ti.targets.C64P target:
    var C64P = xdc.module("ti.targets.C64P");
    C64P.profiles["release"].filters = [
        {moduleName: "target.filters.Simple"}
    ];

    You'll have to do the same for the target you are using. Once you have all this set in place, you just need to make changes in Simple.xs. You don't need to run 'xdc' command when you change Simple.xs. You can just clean and rebuild and the changes will be immediately visible. Let me know how it goes and I help you with inevitable troubles you'll hit along the way.

  • Sasha,

    Thank you for your answers and helps.
    Due to my close deadline, I'm too busy nowadays (other project) and I cannot check your suggestion until now.

    I will check it within soon, then I keep you informed.

    Peter

    PS:
    I hope, I won't be too disappointed if yours will be the good solution to my problem, because
    - it more complicated instead of, for example completing a (standard) makefile with the right options and commands would be
    - I used genAlg xdc wizard (by TI)
    - CCS5 (by TI) cannot import the CCS project which is generated by genAlg wizard
    - the project imported only a makefile project (by TI) what has several disadvantages (e.g. "Rebuild" won't work; double click does not work on compiler error messages for displaying the mistaken line in source file; etc.)
    - I think, my problem is quite generic because I'm sure developing a professional algorithm/codec within only 1 source file (where "static" keywords would work) is impossible

  • Dear Sasha,

    I'm sorry for delay but I had some deadline. Let's back to my XDAIS Rule 8 problem...

    I created the empty target filter files as you suggested into my folder S:/SW/CCS/packages/hexium/xdais but I cannot build it.
    6355.xdais_20130412.zip

    My XDC environment is:

    XDC_INSTALL_DIR = C:/TI/xdctools_3_24_05_48
    XDAIS_INSTALL_DIR = C:/TI/xdais_7_23_00_06
    XDCPATH = C:/TI/xdais_7_23_00_06/packages;S:/SW/CCS/packages

    and when I run the command as follows:

    C:/TI/xdctools_3_24_05_48/xs --xdcpath=C:/TI/xdais_7_23_00_06/packages;S:/SW/CCS/packages hexium.xdais

    I got an error message:

    js: "C:/TI/xdctools_3_24_05_48/packages/xdc/xdc.tci", line 348: xdc.services.global.XDCException: xdc.PACKAGE_NOT_FOUND: S:\SW\CCS\packages\hexium\xdais\package.xdc found along the package path, but no schema file was found.  Ensure that the package 'hexium.xdais' is completely built.

    It seems, the file ./packages/hexium.xdais.sch is missing, but I don't know how can I create it...

    Could you help me to create and build this target filter?
    I am not familiar in XDC tools and its configuration files, but when it will be built, I think JavaScript would not be a problem...

    Thanks.

    Peter

  • Peter,
    the command you need to run is 'xdc' not 'xs':
    C:/TI/xdctools_3_24_05_48/xdc

    You don't need to add --xdcpath to that command and you don't need to specify the name of the package as long as your working directory is hexium/xdais. Try that and you should have a built target filter package. Then, try using that package as I described in my previous post. Let me know how it goes.

  • Dear Sasha and Ramamohana,

    Thanks for your answers and useful helps!
    Finally, your suggestion was worked (my target filter also), my algorithm became XDIAS compatible!

    But, I have a thought for concerned TI's professionals.

    This way to reach conformity of a new algorithm for XDAIS Rule 8 is a nightmare!

    I think, there is impossible to create a real algorithm (codec) using only one source file (which project would be XDAIS compliant, perhaps).
    I believe, for example, every TI's codec (e.g. mpeg4 encoder for any SoC or DSP) is assembled from several source files.

    It is highly suggested to modify genalg wizard, that generated project should contain the relevant target filter, or the makefile itself should contain the linker options for that functionality.
    I believe, it would make easy every developer who want to create a new real algorithm (using several separate source files).

    Thanks a lot again, your support was essential, Sasha and Ramamohana!

    Peter