<?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>Processor Type and compile time switches</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/38575/processor-type-and-compile-time-switches</link><description> 
I am writing FLASH code that will work on both a medium and high
density STM32 chip. Is there a simple way of selecting the FLASH and
PAGE size in my code with out me having two versions of a header
file. In other words are there processor configuration</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Processor Type and compile time switches</title><link>https://community.arm.com/thread/115336?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2009 07:42:26 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b84de59d-4082-460e-bec8-d343452cfd53</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
Thanks&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processor Type and compile time switches</title><link>https://community.arm.com/thread/103559?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2009 07:30:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:3c7df921-b330-4905-bd72-2d807c64df07</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
No - this is a very long-standing deficiency of uVision.&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;:-(&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;
Dunno if it&amp;#39;s possible in the new UV&lt;b&gt;4&lt;/b&gt;, though...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processor Type and compile time switches</title><link>https://community.arm.com/thread/77868?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2009 06:29:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:765f9567-686e-444f-bce8-d7e5dade9e8d</guid><dc:creator>Mark Norman</dc:creator><description>&lt;p&gt;&lt;p&gt;
So I guess from that answer that there is not a way of pulling
this from the processor type selected on the Device tab?&lt;br /&gt;
Is this define stored in the Project file?&lt;br /&gt;
Ok thanks I&amp;#39;ll use this method.&lt;br /&gt;
Cheers.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Processor Type and compile time switches</title><link>https://community.arm.com/thread/57108?ContentTypeID=1</link><pubDate>Thu, 22 Oct 2009 06:23:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c67ad40b-b4fd-4531-8b89-d62d38d8f4b9</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
Create two targets.&lt;/p&gt;

&lt;p&gt;
For each target, select the C/C++ tab.&lt;br /&gt;
In the field Define, you add a suitable preprocessor define.&lt;/p&gt;

&lt;p&gt;
In the source code, you use conditional compilation depending on
the value of your define.&lt;/p&gt;

&lt;pre&gt;
#if PROCESSOR_BIG_BAUTA
    // Building for xxx
    #include &amp;lt;xxx&amp;gt;
#elif PROCESSOR_TINY
    // Building for yyy
    #include &amp;lt;yyy&amp;gt;
#else
    // Oops, unsupported or missing choice
    #error &amp;quot;No known target specified&amp;quot;
#endif
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>