The following is a code snippet from a working application.
.if $$defined(DEBUG) ; Change behavior of divide-by-zero. CP15_ENABLE_DZ_EXCEPTION R0 .endif
I am been pouring through the ARM Assembly Language Tools v4.6 User's Guide and cannot determine why the double $, section 12.4.4 explains the $define directive, does anyone know what the second $ indicates?
Also I need to change this to be if DEBUG or DEVEL is defined but looking through the expression operators in section 3.9.1 it does not appear to support a logical OR operation. Does someone know the correct syntax to accomplish this.
The double dollar sign has no special significance; the name of the built-in operator is '$$defined'. For historical reasons, for ARM the dollar sign is a legal character in an assembly language identifier, and to prevent the built-in operators from being confused with potential user-defined function names, the built-in operators are named with a double dollar sign, which is different than the other TI assemblers.
This should work:
.if $$defined(DEBUG) | $$defined(DEVEL)
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.