<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Undefined Symbol when using Macro</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/18909/undefined-symbol-when-using-macro</link><description> Dear all, 
 I have met a problem when using macro in my project. Here it is my case: 
In file &amp;quot;A.h&amp;quot;: 
 
DelayX9Cyc macro n
 local loop1, loop2
 if (n) &amp;lt;&amp;gt; 0
 mov temp, #n	;;[3]
loop1:
 djnz temp, loop2	;;[3]/[4]
 REPT 3
 NOP ;;[1]
 ENDM
 sjmp loop1 ;;</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Undefined Symbol when using Macro</title><link>https://community.arm.com/thread/44632?ContentTypeID=1</link><pubDate>Mon, 05 Sep 2005 07:28:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d6718e28-8c75-4753-ab6c-d163d93d9fa7</guid><dc:creator>Keil Software Support Intl.</dc:creator><description>&lt;p&gt;actually the problem is the definition of the variable &amp;#39;temp&amp;#39;.&lt;br /&gt;
&lt;br /&gt;
Please use the assembler directive GEN (uVision - Project - Options - Listing - Assembler Listing - Macros: All expansions) and check the *.LST file to find problems like this.&lt;br /&gt;
&lt;br /&gt;
Reinhard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>