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.

Built-In Function ".if $defined" not working correctly

Hi,

I am using the Built-In function ".if $defined" inside CLA assembler file.

.if $defined(FOO)
    ;do something
 .endif

The symbol is defined inside an C-Header file witch is referenced by the CLA assemble file.

Unfortunately the function does not recognize the symbol correctly.

Once compiled with the symbol defined/undefined changes to the sysbol has no effect.

E.g.

First compiled with "//#define FOO" --> Code inside assembler file will not be executed. Change to "#define FOO" --> Code is still not executed.

First compiled with "#define FOO" --> Code inside assembler file will be executed. Change to "//#define FOO" --> Code is still executed.

Only when i do a "-clean" before the symbol is recognized correctly.

Code Composer Studio
Version: 6.1.0.00104

Compiler:TI v6.4.5

Best regards,

André

  • Andre Meyer said:
    Only when i do a "-clean" before the symbol is recognized correctly.

    By this, I assume you mean that if you "clean" the project and then "build", the change in header file is picked up correctly,, but not if you simply "build" again.

    If so, there is a known bug in CCS: "Making changes to a header file does not trigger rebuild of the source file that includes that header file". 
    The bug tracking # is SDSCM00051798 and it will be fixed for a future release of CCS.

    In the meantime, please use the workaround of  "clean and then build" or "rebuild" project to get around this issue.