<?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>how to get environment variables as #defines</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/40760/how-to-get-environment-variables-as-defines</link><description> 
I&amp;#39;d like to import an environment variable into the build. In
other IDEs I&amp;#39;ve been able to do it as a command-line parameter -
e.g.: -D FROM_ENV=$(ENV_VARIABLE) or something like that. 

 
The idea is to have an environment variable set
ENV_VARIABLE</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: how to get environment variables as #defines</title><link>https://community.arm.com/thread/82213?ContentTypeID=1</link><pubDate>Tue, 28 Oct 2014 01:04:39 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:bb526eaf-7f22-4077-9a21-392f091d1d1a</guid><dc:creator>Martin Unger</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Peter,&lt;/p&gt;

&lt;p&gt;
the compiler takes the contents of a specific environment
variable. Sadly the name changes with compiler versions. Example:
ARMCC5_CCOPT&lt;/p&gt;

&lt;p&gt;
I used this in past as&lt;br /&gt;
ARMCC41_CCOPT -DSOMEVAR defines SOMEVAR&lt;br /&gt;
ARMCC41_CCOPT -DULINK=&amp;quot;2&amp;quot; defines ULINK having the value 2&lt;/p&gt;

&lt;p&gt;
To find out how the name is for your compiler see doc or search
exe for &amp;quot;CCOPT&amp;quot;.&lt;/p&gt;

&lt;p&gt;
Just to be complete, the assembler takes an environment variable
like ARMCC41_ASMOPT,&lt;br /&gt;
but syntax differs.&lt;/p&gt;

&lt;p&gt;
hope that helps&lt;/p&gt;

&lt;p&gt;
Martin&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to get environment variables as #defines</title><link>https://community.arm.com/thread/68934?ContentTypeID=1</link><pubDate>Mon, 27 Oct 2014 17:27:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:af18b9e4-4e00-439f-8798-2590e86179e3</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Doesn&amp;#39;t seem to be a Key Sequence for that: &lt;a href="http://www.keil.com/support/man/docs/uv4/uv4_ut_keysequence.htm"&gt;http://www.keil.com/support/man/docs/uv4/uv4_ut_keysequence.htm&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
&lt;b&gt;:-(&lt;/b&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>