Tool/software: Code Composer Studio
Hi,
In the assembly file, the parameter after".if" is a variable, the system will report an error,but the constant will not report an error.As shown below:
The error message is as shown below
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.
Tool/software: Code Composer Studio
Hi,
In the assembly file, the parameter after".if" is a variable, the system will report an error,but the constant will not report an error.As shown below:
The error message is as shown below
The assembler has not made an error. It is working as documented.
Please search the C28x assembly tools manual for the sub-chapter titled Expressions. Note how it states ...
For example, the .if directive requires its operand be an absolute constant expression with an integer value. Absolute in the context of assembly code means that the value of the expression must be known at assembly time.
All the .if directive controls is which lines the assembler processes or ignores. It cannot be used to make a decision that happens when the code is running on the C28x system. That can only be done with C28x CPU instructions. In this sense, it is similar to the #if preprocessor directive in the C programming language. It is not like the if programming statement in C.
Thanks and regards,
-George