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/TMS320F28377S: Wrong C28x instructions used in CLA codes should be warned by the compiler

Part Number: TMS320F28377S

Tool/software: TI C/C++ Compiler

Champs,

If a user uses C28x instructions in CLA codes, will there be warnings in the C2000 compiler?

For example,

If in CLA C codes, they use

EALLOW; //  CLA should use MEALLOW;

asm("NOP"); // CLA should use asm("MNOP");

If not, would you please add warnings in the newer compiler so that the user can avoid making such mistakes?

Some of our customers made this kind of mistake and spent lots of time debugging it.

Wayne

  • I don't know how that happened.  For instance, consider this CLA source file ...

    // file.cla
    
    void fxn()
    {
       // C2000 instructions, not CLA instructions
       asm(" EALLOW");
       asm(" NOP");
    }

    When I build it ...

    C:\work\dir>cl2000 --cla_support=cla0 -s file.cla
    "file.asm", ERROR!   at line 50: [E0000] CLA instructions cannot appear with
                                             non-CLA instructions in the same
                                             section
             EALLOW

    Note the build error occurs not when compiling, but when assembling the code generated by the compiler.  But you do get a build error.  

    Please show how non-CLA instructions can get into CLA code without causing a build error.

    Thanks and regards,

    -George

  • George,

    Please see the attached figures below.

    It seems the errors only occur in the console rather than the "Problems" window as errors or warnings.

    Is my understanding correct?

    If so, would you please modify it to show errors directly on the "Problems" window as well?

    Wayne

  • I filed CCDSK-2959 in the SDOWP system to have this addressed.  You are welcome to follow it with the SDOWP link below in my signature.

    Thanks and regards,

    -George

  • George,

    Thank you very much.

    Wayne