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/TMS320C6657: rts run_pinit problem

Part Number: TMS320C6657

Tool/software: TI C/C++ Compiler

Hello,

I have a problem in the initialization of my software (compiler 8.3.2).

When run_pinit is executed, the loop seems to execute correctly all the initializers except the last one, which pollutes A11.

A11 is used as pointer on the next initializer to execute, so bad code is then executed

Below is the disassembly of the culprit.

  1. At the beginning B12,B11,B10,A11,A10 are pushed on the stack
  2. A11 is modified
  3. At the end A11,A10 are pushed again on the stack and B10,B11,B12 are restored.

Why A10,A11 are pushed again instead of being restored ?

  • The function __sti___11_0E_init_cpp_ccc4a33a is generated automatically.  It initializes a global instance of a class.  Please inspect the linker map file and determine which object file contributes the contents at the address of this function, which is 0x008749a0.  For the C++ source file which corresponds to this address, please follow the directions in the article How to Submit a Compiler Test Case.  That will allow me to reproduce this problem, then submit a test case for the compiler development team to investigate.

    Thanks and regards,

    -George

  • Thank you for sending a test case by private message.  However, I am unable to reproduce the problem.  It turns out your build options refer to other files I do not have ...

    --cmd_file="D:\depot\salamandre_int\OE/env/windows/ccs/common/oe_common_ccflags.cfg"
    --cmd_file="D:\depot\salamandre_int\OE/env/windows/ccs/common/oe_mccm_orbless_ccflags.cfg"
    --cmd_file="D:\depot\salamandre_int\OE/env/windows/ccs/c6x/common/oe_c6x_rtos_ccflags.cfg"

    There must be one or more build options in these files which affect the generated code and cause the problem to occur.  I'd appreciate if you would send me those files as well.

    Thanks and regards,

    -George

  • Thank you for sending the additional files.  Unfortunately, you are correct.  They make no difference in the build.  I continue to be unable to reproduce the problem.  

    The assembly code I see starts the same, but has a quite a few differences.  I don't know what is happening.  

    Please add the build option --src_interlist, then build the problem C++ file.  Look at the assembly code for the function __sti___11_0E_init_cpp_ccc4a33a.  Does it match what you see in the disassembly window in CCS?  

    The compiler package includes a command line disassembler named dis6x.  It is located in the same \bin directory as the other compiler tools.  Please run a command similar to ...

    % dis6x executable_file.out > disassembly_output.txt

    Then compare that to the disassembly window in CCS.  Does it match?

    I'm not sure what you will see.  My guess is some unexpected difference will appear, which might help explain what happened.

    Thanks and regards,

    -George

  • Hello George,

    I confirm  this is not a compiler problem. We have done some clean up in our linker command file and the problem disappeared

    Thanks for your support

    David