<?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>a problem with macro definition</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/16413/a-problem-with-macro-definition</link><description> #define FLASH_BASE 0x080000 
 
#define RECORD_SIZE 32 
#define RECORDS_PER_SECTOR	(FLASH_SECTOR_SIZE / RECORD_SIZE) 
#define MAX_RECORD_NUM 30135 
#define MAX_RECORD_ADDR (MAX_RECORD_NUM * RECORD_SIZE + FLASH_BASE) 
 
i found that MAX_RECORD_ADDR is</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: a problem with macro definition</title><link>https://community.arm.com/thread/71621?ContentTypeID=1</link><pubDate>Thu, 10 Jul 2003 03:43:48 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:d372b471-c985-438c-8f09-38133309d0cb</guid><dc:creator>Keil  Support Intl.</dc:creator><description>&lt;p&gt;See also: &lt;a href="http://www.keil.com/support/docs/225.htm"&gt;http://www.keil.com/support/docs/225.htm&lt;/a&gt;&lt;br /&gt;
This explains why you get this results.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: a problem with macro definition</title><link>https://community.arm.com/thread/40517?ContentTypeID=1</link><pubDate>Thu, 10 Jul 2003 03:11:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ed154925-8fc8-4fca-a968-6700a54c5b40</guid><dc:creator>John Donaldson</dc:creator><description>&lt;p&gt;Probably because 30135 and 32 are treated as 16 bit integers. Do this instead:&lt;br /&gt;
&lt;br /&gt;
#define MAX_RECORD_NUM 30135L&lt;br /&gt;
&lt;br /&gt;
Stefan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>