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.

EVMK2G: intcVectorTable undefined symbol in CCS10.2

Part Number: EVMK2G

Hi experts,

For my work I am dealing with the porting of an application from OMAPL137 to EVMK2G.

I downloaded the ti-processor-sdk-rtos-k2g-evm-06.03.00.106-Windows-x86-Install.exe and I installed CCS10.2.

Then I fixed the main compilation problems due to the porting.

Currently, I have a compilation error concerning the vector table.

In my project I have replaced the "old" intvecs.asm with C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\arch\c67x\src\intvecs.asm.

However, the project compilation gives me the following errors: 
Invoking: C6000 Linker
"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/bin/cl6x" -mv6600 --abi=eabi -Ooff --opt_for_speed=4 -ms0 --define=DEVICE_K2G --define=SOC_K2G --define=EVM_K2G --define=IO_CONSOLE -g --keep_unneeded_statics --diag_warning=225 --display_error_number --call_assumptions=0 --asm_listing --gen_opt_info=0 -z -m"C:/SwReD/mla/A/miami/OBJD/prjD.map" --stack_size=0x1000 -i"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/lib" -i"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/arch/c67x/src" -i"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/arch/c67x" -i"C:/ti_hpc/dsplib_c66x_3_4_0_4/packages" -i"C:/ti_hpc/dsplib_c66x_3_4_0_4/packages/ti/dsplib/src/common/c66" -i"C:/ti_hpc/mathlib_c66x_3_1_2_4/packages" -i"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" --reread_libs --warn_sections --xml_link_info="C:/SwReD/mla/A/miami/OBJD/prjD_linkInfo.xml" --rom_model -o "C:/SwReD/mla/A/miami/OBJD/prjD.out" "./lc66x/dspdrv.obj" "./lc66x/dsptmg.obj" "./lc66x/freq.obj" "./lc66x/intvecs.obj" "./lc66x/m29w.obj" "./lc66x/uart.obj" "./lc66x/util.obj" "./miami/versD.obj" "./mla/askid.obj" "./mla/blend.obj" "./mla/calfre.obj" "./mla/chopd.obj" "./mla/coscor.obj" "./mla/diagfasid.obj" "./mla/dspmain.obj" "./mla/filtri.obj" "./mla/libfund.obj" "./mla/motMon.obj" "./mla/perfd.obj" "./mla/pwcal.obj" "./mla/pwges.obj" "./mla/rif.obj" "./mla/tbpard.obj" "./mla/termo.obj" "./mla/vardsp.obj" "C:/SwRed/lc66x/Linkers/lnk_k2x.cmd" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/lib/k2g/c66/release/ti.csl.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/lib/k2g/c66/release/ti.csl.intc.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/osal/lib/nonos/k2g/c66/release/ti.osal.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/board/lib/evmK2G/c66/release/ti.board.ae66" -llibc.a
<Linking>
"C:/SwRed/lc66x/Linkers/lnk_k2x.cmd", line 56: warning #10068-D: no matching
section

undefined first referenced
symbol in file
--------- ----------------
intcVectorTable ./lc66x/dspdrv.obj

error #10234-D: unresolved symbols remain
error #10010: errors encountered during linking;
"C:/SwReD/mla/A/miami/OBJD/prjD.out" not built

>> Compilation failure
makefile:174: recipe for target 'C:/SwReD/mla/A/miami/OBJD/prjD.out' failed
gmake: *** [C:/SwReD/mla/A/miami/OBJD/prjD.out] Error 1
gmake: Target 'all' not remade because of errors.

The function intcVectorTable is defined within the file C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\arch\c67x\interrupt.c that I have included in the library search path (see figure below)

Is there a missing library that I should include in order to fix the compilation failure?

Waiting for a your feedback.

Thank you in advance for the support.

Best regards,

Benito

 

 

  • Hi Benito,

    K2G has a C66x DSP, but you added intvecs.asm from the C67x CSL folder: C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\arch\c67x\src\intvecs.asm. 

    Try to use C:\ti\pdk_k2g_1_0_16\packages\ti\csl\arch\c66x\src\intvecs.asm instead.

    Regards,

    Jianzhong

  • Dear mr. jianzhongxu,

    thank you for your support.

    I linked C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\arch\c67x\src\intvecs.asm, because its vector table is more similar to the vector table of omapl137. 

    However, I followed your suggestion but the compilation error still remains. 


    Building target: "C:/SwReD/mla/A/miami/OBJD/prjD.out"
    Invoking: C6000 Linker
    "C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/bin/cl6x" -mv6600 --abi=eabi -Ooff --opt_for_speed=4 -ms0 --define=DEVICE_K2G --define=SOC_K2G --define=EVM_K2G --define=IO_CONSOLE -g --keep_unneeded_statics --diag_warning=225 --display_error_number --call_assumptions=0 --asm_listing --asm_directory="C:/SwRed/mla/A/miami/OBJD" --list_directory="C:/SwRed/mla/A/miami/OBJD" --obj_directory="C:/SwRed/mla/A/miami/OBJD" --gen_opt_info=0 -z -m"C:/SwReD/mla/A/miami/OBJD/prjD.map" --stack_size=0x1000 -i"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/lib" -i"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/arch/c66x/src" -i"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/arch/c66x" -i"C:/ti_hpc/dsplib_c66x_3_4_0_4/packages" -i"C:/ti_hpc/dsplib_c66x_3_4_0_4/packages/ti/dsplib/src/common/c66" -i"C:/ti_hpc/mathlib_c66x_3_1_2_4/packages" -i"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" --reread_libs --warn_sections --xml_link_info="C:/SwReD/mla/A/miami/OBJD/prjD_linkInfo.xml" --rom_model -o "C:/SwReD/mla/A/miami/OBJD/prjD.out" "C:/SwRed/mla/A/miami/OBJD/dspdrv.obj" "C:/SwRed/mla/A/miami/OBJD/dsptmg.obj" "C:/SwRed/mla/A/miami/OBJD/freq.obj" "C:/SwRed/mla/A/miami/OBJD/intvecs.obj" "C:/SwRed/mla/A/miami/OBJD/m29w.obj" "C:/SwRed/mla/A/miami/OBJD/uart.obj" "C:/SwRed/mla/A/miami/OBJD/util.obj" "C:/SwRed/mla/A/miami/OBJD/versD.obj" "C:/SwRed/mla/A/miami/OBJD/askid.obj" "C:/SwRed/mla/A/miami/OBJD/blend.obj" "C:/SwRed/mla/A/miami/OBJD/calfre.obj" "C:/SwRed/mla/A/miami/OBJD/chopd.obj" "C:/SwRed/mla/A/miami/OBJD/coscor.obj" "C:/SwRed/mla/A/miami/OBJD/diagfasid.obj" "C:/SwRed/mla/A/miami/OBJD/dspmain.obj" "C:/SwRed/mla/A/miami/OBJD/filtri.obj" "C:/SwRed/mla/A/miami/OBJD/libfund.obj" "C:/SwRed/mla/A/miami/OBJD/motMon.obj" "C:/SwRed/mla/A/miami/OBJD/perfd.obj" "C:/SwRed/mla/A/miami/OBJD/pwcal.obj" "C:/SwRed/mla/A/miami/OBJD/pwges.obj" "C:/SwRed/mla/A/miami/OBJD/rif.obj" "C:/SwRed/mla/A/miami/OBJD/tbpard.obj" "C:/SwRed/mla/A/miami/OBJD/termo.obj" "C:/SwRed/mla/A/miami/OBJD/vardsp.obj" "C:/SwRed/lc66x/Linkers/lnk_k2x.cmd" -llibc.a -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/lib/k2g/c66/release/ti.csl.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/lib/k2g/c66/release/ti.csl.intc.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/osal/lib/nonos/k2g/c66/release/ti.osal.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/board/lib/evmK2G/c66/release/ti.board.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/drv/uart/lib/k2g/c66/release/ti.drv.uart.ae66"
    <Linking>
    "C:/SwRed/lc66x/Linkers/lnk_k2x.cmd", line 55: warning #10068-D: no matching
    section
    warning #10346-D: Symbol "__STACK_SIZE" is a COFFABI symbol deprecated in EABI;
    use EABI symbol "__TI_STACK_SIZE" instead. For additional information,
    please see the 'C6000 EABI Migration' guide at
    processors.wiki.ti.com/.../C6000_EABI:C6000_EABI_Migration
    ol_Name_Changes

    undefined first referenced
    symbol in file
    --------- ----------------
    intcVectorTable C:/SwRed/mla/A/miami/OBJD/dspdrv.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking;
    "C:/SwReD/mla/A/miami/OBJD/prjD.out" not built

    >> Compilation failure
    makefile:175: recipe for target 'C:/SwReD/mla/A/miami/OBJD/prjD.out' failed
    gmake: *** [C:/SwReD/mla/A/miami/OBJD/prjD.out] Error 1
    gmake: Target 'all' not remade because of errors.

    **** Build Finished ****

    I suspect that CCS10.2 does not compile the file intvecs.asm. This could explain the reason for which the symbol _intcVectorTable is not defined despite I correctly added the file intvecs.asm in my project.

    Should I change other settings in CCS10.2 in order to properly compile the vector table?

    Thank you for your support.

    Benito 

     

  • I share 2 details that could be useful in order to solve the problem:

    1) Within the file library  C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\lib\k2g\c66\release\ti.csl.intc.ae66 there is the symbol _CSL_intcVectorTable while in my intvecs.asm there is _intcVectorTable. However I tried to replace _intcVectorTable with _CSL_intcVectorTable in my application without solving the compilation errors

    2) I am performing a porting from OMAP to EVMK2G. The old project was developed in CCS5.1 with output format legacy COFF while the new project is developed in CCS10.2 with output format eabi. I read this post:  https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/49843/undefined-symbol-referencing-errors and I realized that in COFF, C identifiers are transformed by the compiler by adding an underscore to the beginning.

    In my case I modified the intvecs.asm by erasing the character "_" before the symbol name. The symbol intcVectorTable is resolved but new errors appear:

    undefined first referenced
    symbol in file
    --------- ----------------
    c674x_mask_int10_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int11_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int12_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int13_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int14_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int15_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int4_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int5_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int6_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int7_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int8_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_mask_int9_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_nmi_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_rsvd_int2_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj
    c674x_rsvd_int3_isr C:/SwRed/mla/A/miami/OBJD/intvecs.obj

    Please, note that I correctly generate the obj files.

    Thank you for the support,

    Benito

  • Hi Benito,

    When you port your code from OMAP to K2G, all C code will be automatically compiled for the new device. However, assembly code is device specific and you can't simply compile C674x assembly code for C66x. All the undefined symbols you listed above are C674x specific and unavailable in C66x CSL library.

    1) Within the file library  C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\lib\k2g\c66\release\ti.csl.intc.ae66 there is the symbol _CSL_intcVectorTable while in my intvecs.asm there is _intcVectorTable. However I tried to replace _intcVectorTable with _CSL_intcVectorTable in my application without solving the compilation errors

    Did you use pdk_k2g_1_0_16\packages\ti\csl\arch\c66x\src\intvecs.asm? What was the compilation error?

    Regards,

    Jianzhong

  • Dear Mr. Jianzhoungxu,

    thank you for your reply.

    I used the pdk_k2g_1_0_16\packages\ti\csl\arch\c66x\src\intvecs.asm.

    Here below, the compilation error:

    Building target: "C:/SwRed/mla/A/miami/prjD/../OBJD/prjD.out"
    Invoking: C6000 Linker
    "C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/bin/cl6x" -mv6600 --abi=eabi -Ooff --opt_for_speed=4 -ms0 --advice:performance=all --define=DEVICE_K2G --define=SOC_K2G --define=EVM_K2G --define=IO_CONSOLE -g --keep_unneeded_statics --diag_warning=225 --display_error_number --call_assumptions=0 --asm_listing --asm_directory="C:/SwRed/mla/A/miami/OBJD" --list_directory="C:/SwRed/mla/A/miami/OBJD" --obj_directory="C:/SwRed/mla/A/miami/OBJD" --gen_opt_info=0 -z -m"C:/SwRed/mla/A/miami/OBJD/prjD.map" --stack_size=0x1000 -i"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/lib" -i"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/arch/c66x/src" -i"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/arch/c66x" -i"C:/ti_hpc/dsplib_c66x_3_4_0_4/packages" -i"C:/ti_hpc/dsplib_c66x_3_4_0_4/packages/ti/dsplib/src/common/c66" -i"C:/ti_hpc/mathlib_c66x_3_1_2_4/packages" -i"C:/ti_hpc/ccs10.2/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" --reread_libs --warn_sections --xml_link_info="prjD_linkInfo.xml" --rom_model -o "C:/SwRed/mla/A/miami/prjD/../OBJD/prjD.out" "C:/SwRed/mla/A/miami/OBJD/dspdrv.obj" "C:/SwRed/mla/A/miami/OBJD/dsptmg.obj" "C:/SwRed/mla/A/miami/OBJD/freq.obj" "C:/SwRed/mla/A/miami/OBJD/intvecs.obj" "C:/SwRed/mla/A/miami/OBJD/m29w.obj" "C:/SwRed/mla/A/miami/OBJD/uart.obj" "C:/SwRed/mla/A/miami/OBJD/util.obj" "C:/SwRed/mla/A/miami/OBJD/versD.obj" "C:/SwRed/mla/A/miami/OBJD/askid.obj" "C:/SwRed/mla/A/miami/OBJD/blend.obj" "C:/SwRed/mla/A/miami/OBJD/calfre.obj" "C:/SwRed/mla/A/miami/OBJD/chopd.obj" "C:/SwRed/mla/A/miami/OBJD/coscor.obj" "C:/SwRed/mla/A/miami/OBJD/diagfasid.obj" "C:/SwRed/mla/A/miami/OBJD/dspmain.obj" "C:/SwRed/mla/A/miami/OBJD/filtri.obj" "C:/SwRed/mla/A/miami/OBJD/libfund.obj" "C:/SwRed/mla/A/miami/OBJD/motMon.obj" "C:/SwRed/mla/A/miami/OBJD/perfd.obj" "C:/SwRed/mla/A/miami/OBJD/pwcal.obj" "C:/SwRed/mla/A/miami/OBJD/pwges.obj" "C:/SwRed/mla/A/miami/OBJD/rif.obj" "C:/SwRed/mla/A/miami/OBJD/tbpard.obj" "C:/SwRed/mla/A/miami/OBJD/termo.obj" "C:/SwRed/mla/A/miami/OBJD/vardsp.obj" "C:/SwRed/lc66x/Linkers/lnk_k2x.cmd" -llibc.a -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/lib/k2g/c66/release/ti.csl.intc.ae66" -l"C:/ti_hpc/pdk_k2g_1_0_16/packages/ti/csl/lib/k2g/c66/release/ti.csl.ae66"
    <Linking>
    "C:/SwRed/lc66x/Linkers/lnk_k2x.cmd", line 55: warning #10068-D: no matching
    section
    warning #10346-D: Symbol "__STACK_SIZE" is a COFFABI symbol deprecated in EABI;
    use EABI symbol "__TI_STACK_SIZE" instead. For additional information,
    please see the 'C6000 EABI Migration' guide at
    processors.wiki.ti.com/.../C6000_EABI:C6000_EABI_Migration
    ol_Name_Changes

    undefined              first referenced
    symbol                   in file
    ---------                   ----------------
    intcVectorTable      C:/SwRed/mla/A/miami/OBJD/dspdrv.obj

    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking;
    "C:/SwRed/mla/A/miami/prjD/../OBJD/prjD.out" not built

    >> Compilation failure
    makefile:172: recipe for target 'C:/SwRed/mla/A/miami/prjD/../OBJD/prjD.out' failed
    gmake: *** [C:/SwRed/mla/A/miami/prjD/../OBJD/prjD.out] Error 1
    gmake: Target 'all' not remade because of errors.

    The error arises because in my application there is a function for the initialization of OMAP:

    void dspdrv_omapIntSetup(void)
    {
      /* set ISTP to point to the vector table address */
         ISTP = (unsigned int)intcVectorTable;

        /* clear all interrupts, bits 4 thru 15 */
        ICR = 0xFFF0;

       /* enable the bits for non maskable interrupt and */
        IER = 0xF2;

       /* enable interrupts, set GIE bit */ 
       _enable_interrupts();
    }

    Should I replace the intcVectorTable with an other symbol defined within the vector table of c66x?

    Thank you for your support.

    Best regards,

    Benito Carotenuto

  • Hi Benito,

    I thought you already tried to replace _intcVectorTable with _CSL_intcVectorTable, and had errors. Please see below. 

    1) Within the file library  C:\ti_hpc\pdk_k2g_1_0_16\packages\ti\csl\lib\k2g\c66\release\ti.csl.intc.ae66 there is the symbol _CSL_intcVectorTable while in my intvecs.asm there is _intcVectorTable. However I tried to replace _intcVectorTable with _CSL_intcVectorTable in my application without solving the compilation errors

    I was asking you what kind of errors you got by doing the above.

    Should I replace the intcVectorTable with an other symbol defined within the vector table of c66x?

    Because _intcVectorTable is for C67x only, you'll need to replace it for C66x. 

    Regards,

    Jianzhong

  • Dear mr jianzhongxu,

    thank you for your support.

    Last days I came across this post: https://www.programmersought.com/article/98974642208 that explains how to configure interrupts on keystone architectures by means of CSL APIs. 

    The post provides also an example of interrupt configuration.

    I tried to follow this post in order to configure the interrupts on K2G. 

    I'll let you know if it works as soon as possible.

    Best regards,

    Benito Carotenuto