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.

TMS320VC33: Compiler issue

Part Number: TMS320VC33

Hi experts

The current DSP used by the customer's device is TMS320VC33. Their code is optimized by the compiler during compilation, which results in an inconsistency between the actual execution logic and the code logic.

Texas Compiler Version: V4.70

The optimization options are: -o2 -x

For code optimization for the compiler, we need your support for:

1. Details on what optimizations the V4.70 version of the compiler has that cause the C code final execution file error.

2. Under what condition C code will be optimized

3. What are the considerations in the code writing process to avoid inconsistencies between the optimized code execution logic and the writing logic. 

For example, customer sees the following bug in a TI compiler manual. What are the specific details of this bug? Does V4.70 have this bug?

  • The best information about compiler optimization is in the C30 compiler manual.  Focus on the sub-chapter titled Using the C Compiler Optimizer.  

    Regarding the issue with the identifier SDSsq04227.  Unfortunately, I am unable to supply further details.  The system where that issue is recorded was turned off many years ago.

    I realize this is less information than you would like.  Unfortunately, for a compiler that ended support many years ago, this is all that remains.

    Thanks and regards,

    -George

  • Hi George

    Customer think there is very little information about optimizer in the manual. This does not help us locate the problem.

    Problems with the compiler can cause customer power protection equipment to fail.

    What are the bugs in the V4.70 optimizer, we hope you to provide as much detailed information as possible to help us locate the problem.

    Can you give me some advise?

  • What are the bugs in the V4.70 optimizer

    The closest I can come to answering that comes from this readme file that is part of the next release of the C30 compiler, version 5.00.

    --------------------------------------------------
    TEXAS INSTRUMENTS MICROPROCESSOR DEVELOPMENT TOOLS
    --------------------------------------------------
     
    Thank you for choosing Texas Instruments software development tools.  It is our
    goal to provide you with the most useful and efficient development tools from
    which to develop your applications around Texas Instruments processors.
    Included in the package you will find our Customer Support Guide which shows
    services available to our Customers.  Also, included in the package is a copy
    of our Getting Started Guide, which gives you the most up-to-date information
    on documentation updates, changes in installation procedures, and any new
    operational issues with this version of the software.
     
    The following V4.70 defects have been fixed with V5.00:
    
         Ref #       Bug Description
         --------    -----------------------------
         SDSsq03144  "ISR does not save AR0 even though it modifies it"
                        Interrupt Service Routines are not properly saving
                        all the registers, especially AR0 in the example
                        code given.
    
         SDSsq03247  "Sometimes the map and stdout don't report .cinit section"
    	 	    Under some situations after using the -cr 
    		    (RAM initialization - initialization by loader) option 
    		    with the Linker, hex30 will fail to specify to stdout 
    	 	    and the hex30 map file that the .cinit section is being 
    		    placed in the hex output.
    
         SDSsq03254  "Linker core dumps when fill is used in MEMORY directive"
    
         SDSsq03255  "Passing -g to asm30 does not work with current Debuggers"
                        When the -g option is used with asm30 or cl30 for
                        assembly files, the assembler places debug information
                        in the COFF file that makes the C3x Debugger V5.00 and
                        the C4x Debugger V2.40 fail.
    
         SDSsq03256  "opt30 does not recognize the -v32 and -v44 options"
                        The optimizer does not recognize the -v32 or -v44
                        option.  This is true even when the shell, cl30, calls
                        the optimizer, opt30.
    
         SDSsq03264  "Out of memory error with Win32 and DOS/4GW versions"
                        The shell, cl30, will give a "out of memory" error if
                        it is called without a source file on the command line
                        (for example: cl30 -z c30.cmd).  This is only a problem
                        with the DOS versions.
    
         SDSsq03277	 "Request to add command file capability to ar30"
    
         SDSsq03298  "Bug dereferencing a casted pointer to a float member
    		  of a structure"
    		     When using -sn incorrect code is generated for the
    		     following code sequence
    
    		     typedef struct{
    			float f;
    			int i;
    		     }A;
    
    		     bug(A *a, int *ptr){
    			ptr[1] = *(int *)&a->f;
    		     }
    		    
         SDSsq03324  "The optimizer incorrectly calculated an address while
    		  folding a loop"
    
         SDSsq03354  "Hex conversion utility reports an error when using
    		  the -cr option"
    
         SDSsq03360	 "Compiler generates incorrect code for an assignment 
    		  to a floating point structure member"
    
         SDSsq03390	 "Assembler gives cryptic error message for misuse of R11
    		  in 3 operand instruction"
    		  
                      The assembler gives the cryptic error message:
       
    		  "filename", line xx:  PORTS MUST BE PREDEFINED FOR 
    	  	  THIS INSTRUCTION
    
    		  when R11 is improperly used in a parallel MPYF3 || STF 
    		  instruction.
    
    	 	   i.e.      mpfy3 *ar1++(1)%, r6, r11
                              || stf   r11, *aro++(1)
    
         SDSsq03457  "Compiler generates an instruction stream that corrupts 
    		  condition codes set by a compare and used by a branch"
    
    
    
     

    You'll notice that SDSsq04227 does not appear.  Based on the number, it is likely that it was reported after the 5.00 release.  That means it is likely that, when SDSsq04227 was first reported, there was no investigation into whether it is present in older releases like version 4.70.  

    Again, I realize this is less information than you would like.  But, for a compiler that stopped being supported many years ago, this is the best information that remains available.

    Thanks and regards,

    -George

  • Out problem is as following:

    Texas Compiler Version: V4.70 vs V5.11

    The optimization options are: -o2 -x

    The variable bReadVal is FALSE in following C code.

    These content are printed if we use the V4.70 compiler

    If we use the V5.11 compiler, it will run in correctly logical. The program doesnt print this information.

    we want to know why and which condition will cause this issue and how to avoid this scenario in coding?

     

  • Unfortunately, it is beyond our capability to answer detailed questions such as this one.  As I have already explained, the compiler stopped being supported many years ago.  The expertise and knowledge needed in this case is simply no longer available.

    Thanks and regards,

    -George