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.

Compiler/TDA2: When will the visionSDK3 's cgtc6000 compiler upgrade to v8.x.x ?

Part Number: TDA2
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI C/C++ Compiler

The cgtc6000 comiler v7.4.2 is used in the latest visionSDK3.05. The v7.4.2 comiler is not enough for our project, the v8.x.x is OK.

In below thread,

e2e.ti.com/.../715156

Rishabh Garg  told me that the visionSDK3.05 will upgrade cgtc6000 comiler to v8.x.x two month ago.

But visionSDK 3.05 still use v7.4.2 when it was released.

So when will visionSDK upgrade cgtc6000 compiler to v8.x.x?

  • Hi Bao,

    CGT change was planned for the 03.05 release.
    I will get back to you with details.

    Regards,
    Rishabh
  • Hi Bao,

    There were some issues due to which we could not change the compiler to 8.x.
    You can compile your algorithm with 8.x compiler and link the library with Vision SDK which is built using 7.4.2.

    Regards,
    Rishabh
  • Dear Rishabh,
    Thanks for your reply.
    We tried use v8.1.3 comiler compile our algorithm and link the library with vision SDK which is built using v7.4.2. We got the binary file.
    But the DSP2 program was crashed when the system is startup before main() function was called.
    The detail of this issue was descriped in the orignal thread.
  • Hi Bao,

    The original question mentions that you have build SDK also with v8.1.3 compiler.
    Also we are trying to upgrade to 8.2.4 compiler.
    With this version we have not seen any crash.
    As an experiment can you try this version.

    Regards,
    Rishabh
  • OK, I will try it later。
  • Hi Bao,

    Do let me know in case you face any issues.

    Regards,
    Rishabh
  • Hi Rishabh,
    As your suggestion,
    I comile our algorithm by v8.2.4 comiler and link the library with Vision SDK which is built using 7.4.2.
    The issue still exist. The system can't startup properly.
    Our algorithm refer comlex c++ .
    I debug it , the dsp program crashed in __c_init00, which do some initialization for the program.
    If I comment off the c++ related function calls from our algorithm, the system startup properly.
  • Hi Bao,

    Can you please debug it further and see what are the exact instructions that are causing DSP to crash.
    It might be an issue with some compiler options.

    Regards,
    Rishabh
  • Hi Rishabh,

       When I debug it:

       (1) I set a break point at "_c_int00" for DSP2.

       (2)  I load the DSP2 exectable file "vision_sdk_c66xdsp_2_release.xe66".

              The CCS show :    Can't find a source file at "/db/ztree/library/trees/xdctargets/xdctargets-l07/src/ti/targets/rts6000/boot.c"

              I locate the path as "PROCESSOR_SDK_VISION_03_05_00_00\ti_components\os_tools\bios_6_46_04_53\packages\ti\targets\rts6000"

       (3) Then debug step by step to fuction "_auto_init_elf",  I just see the program crashed at below code seciotns, and crashed at function "memcpy" :

       if (!(&__TI_Handler_Table_Base >= &__TI_Handler_Table_Limit))

      {

         table_ptr   = (unsigned char**) &__TI_CINIT_Base;

         table_limit = (unsigned char**) &__TI_CINIT_Limit;

         while (table_ptr < table_limit)

         {

           unsigned char* load_addr  = *table_ptr++;

           unsigned char* run_addr   = *table_ptr++;

           unsigned char handler_idx = *load_addr++;

           handler_fptr handler      = (handler_fptr)(&HANDLER_TABLE)[handler_idx];

           (*handler)((const unsigned char*)load_addr, run_addr);

         }

      }

    Exception at 0x857ad40c

    857ad380    000000a0     rts6600_elf.lib : memcpy64.obj (.text:memcpy)
    857ad420    000000a0                     : modf.obj (.text:modf) 

       (4) Once time , I see the program crashed after execute " table_limit = (unsigned char**) &__TI_CINIT_Limit;", maybe due to the symbol not match.

       (5) I attach the AppImage and vision_sdk_c66xdsp_2_release.xe66.  You could try on your board, the DDR size is 1G.

    executable file.rar

  • Hi Bao,

    Unfortunately the person who is working on CGT migration is out of office this week.
    Kindly expect a slight delay in response.

    Regards,
    Rishabh
  • Hi,

    First you have to try to build your algorithm with CGT 7.4.2 and check whether it works with that or not.
    Before trying the above thing we are not sure whether your algorithm is causing crash or the new CGT.

    TI has tested VLIB and VXLIB with CGT 8.2.4 and the rest of the VSDK with CGT 7.4.2 and that works fine in VSDK 3.5 release.

    Regards,
    Anuj
  • Hi Anuj,
    We compile our algorithm failed use CGT 7.4.2. There are so many errors that we can't resolve them.
    But we compile it success use CGT 8.1.3 and 8.2.4, didn't need to modify anything.

    We comile our algorithm use CGT8.1.3 and link it with CGT8.1.3 in visionSDK2.10 which use CGT7.4.2 as default comiler.
    We use linux as the OS for the emmbedded system. The whole system could run properly.

    On the visionSDK 3.03 and 3.05, I try to use CGT8.1.3 and 8.2.4, we use sysbios as the embedded system. The DSP2 crashed during the program initialization stage. Which contains our algorithm.

    I think the difference between the boot program on the linux and sysbios. Linux 's boot program load all the data the DSP initial program needed, the Sysbios 's boot program not load all the data the DSP initial program needed. So the DSP program crashed during the initial stage after the Sysbios 's boot program load the DSP 's data into the DDR, and let it to run.
  • Hi Bao,

    Can you check differences for DSP makreules between VSDK 2.10 and VSDK 3.05? There is a gap of around two years amongst the two releases. Can you share both these files as an attachment here. It is possible that the compression format for cinit section has changed between the two which is creating issues.

    Regards,
    Rishabh
  • Hi Rishabh,

        The makerules of v2.10 and v3.05 attached.makerules.rar

  • Hi,

    Are you able to boot using sysbios as OS using VSDK v2.12 with your algo compiled using 8.x.x?

    Regards,
    Anuj
  • Hi Anuj,
    We never try it.
  • Hi,

    Can you please try that.
    And also try to run any openvx related usecase and check whether that runs?

    Regards,
    Anuj
  • Hi Bao,

    The RTS library that was used for linking in 2.10 is different as compared to 3.05 which could be leading to crash.
    Can you try to change RTS lib and see if it works.
    Another experiment could be using 2.10 DSP makerules (i.e. rules_66.mk.
    Again please keep in mind that VSDK 3.05 might not work at all if compiled using older DSP makerules.

    Regards,
    Rishabh
  • Hi Rishabh,
    I have tried replace the 3.05's RTS lib with 2/10's, the crash still exist.
    I just replace the "PROCESSOR_SDK_VISION_03_05_00_00\ti_components\os_tools\bios_6_46_04_53\packages\ti\targets" folder with 2.10's.

    Due to the lib names and path are different in 2.10 and 3.05 's makerules, I can't replace it.

    I wan't to debug more detail in boot.ae66, which include autoinit.c and boot.c 's obj.
    But I don't know how to build the two source file to boot.ae66, I just get boot.lib with "-g" option, and rename it to boot.ae66.
    I use cgt 8.2.4, and replace it with 3.05 orignal. Then I can't connect the DSP by debugger, the DSP program didn't get into _c_int00.
    I think it failed during the parse stage.

    I have browse the initialization part of the compiler doc, I wan't to know the more detail of the crash reason.
    So, could you help me compile autoinit.c and boot.c to boot.ae66 by 8.2.4 with "-g" option, and attach these three files to me ?
    These two files are under "PROCESSOR_SDK_VISION_03_05_00_00\ti_components\os_tools\bios_6_46_04_53\packages\ti\targets\rts6000".
  • Hi,

    Which profile are you using?

    debug or release.

    Please use debug mode and build the entire VSDK along with your algo with CGT 8.2.4.

    Regards,

    Anuj

  • Hi Anuj,
    I use debug profile.
    And use command "make -s -j depend", then "make -s -j", then "make -s -j appimage".
    I found that the libs under "PROCESSOR_SDK_VISION_03_05_00_00\ti_components\os_tools\bios_6_46_04_53\packages\ti\targets\rts6000\lib" were not rebuilt, they keep the status from ti release. And they are in release mode. When I debug boot.ae66 in CCS step by step , the source code can't match the executable exactly.
  • Hi,

    We do not rebuild the bios and we use only prebuild lib of it which is in release mode. So if you single step then you can find some mismatch as its in release mode.

    And it should work with CGT 8.2.4 in debug mode, if its not happening then definitely there is some issue in your algo.

    Regards,
    Anuj
  • Hi Anuj,
    I see under visionSDK2.10 , in the DSP 's map file:
    .cinit 0 91300000 00000000 UNINITIALIZED

    But under visionSDK3.05 , in the DSP 's map file:
    .cinit 0 883bf618 0000b068
    883bf618 0000b015 (.cinit..fardata.load) [load image, compression = rle]
    883ca62d 00000003 --HOLE-- [fill = 0]
    883ca630 00000022 (.cinit..neardata.load) [load image, compression = rle]
    883ca652 00000002 --HOLE-- [fill = 0]
    883ca654 0000000a (.cinit..rodata.load) [load image, compression = rle]
    883ca65e 00000002 --HOLE-- [fill = 0]
    883ca660 00000008 (__TI_handler_table)
    883ca668 00000018 (__TI_cinit_table)

    I think this is the reason of my issue.

    How could I get the .cinit like 2.10 in 3.05 ? Any linker or compiler options needed?
  • Hi,

    Can you please share the resolution for this issue.

    Regards,
    Rishabh
  • Hi Rishabh,
    Our algorithm allocate huge memory in static structures, I removed them and use malloc.
  • Hi Bao,

    Ok. Thanks for the confirmation.

    Regards,

    Rishabh