<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Illegal constant expression: copying address to a variable in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873236#M7445</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="296727" data-username="amitdhand" href="https://community.nxp.com/people/amitdhand"&gt;Amit Dhand&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I test on my side , these code can work well on my side.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75332i2259FA0CBC1E868D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which chip do you used ?&lt;/P&gt;&lt;P&gt;I recommend you create a new project, then copy and paste these code into it , build, check whether can work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2019 04:02:42 GMT</pubDate>
    <dc:creator>Alice_Yang</dc:creator>
    <dc:date>2019-02-20T04:02:42Z</dc:date>
    <item>
      <title>Illegal constant expression: copying address to a variable</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873235#M7444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to compile the below mentioned code in Code-warrior 10.7 but CW throws an error "illegal constant expression"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;uint32_t val1;&lt;BR /&gt;uint32_t val2;&lt;BR /&gt;uint32_t val2 = (uint32_t)&amp;amp;val2;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Error is specified in this line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;// some code&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression could work out with pointers but I am importing a code from IAR Embedded Workbench to Code-warrior and in&amp;nbsp;&lt;SPAN&gt;IAR Embedded Workbench&amp;nbsp;there is no such problem with such an expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 15:34:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873235#M7444</guid>
      <dc:creator>amitdhand</dc:creator>
      <dc:date>2019-02-19T15:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal constant expression: copying address to a variable</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873236#M7445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello &lt;A _jive_internal="true" data-content-finding="Community" data-userid="296727" data-username="amitdhand" href="https://community.nxp.com/people/amitdhand"&gt;Amit Dhand&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;I test on my side , these code can work well on my side.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75332i2259FA0CBC1E868D/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_3.png" alt="pastedImage_3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which chip do you used ?&lt;/P&gt;&lt;P&gt;I recommend you create a new project, then copy and paste these code into it , build, check whether can work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 04:02:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873236#M7445</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-02-20T04:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal constant expression: copying address to a variable</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873237#M7446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;SPAN class=""&gt;Alice_Yang for your prompt response on the query.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;It is my mistake that I didn't recheck the code before posting. The problem still remains the same &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;uint32_t val1;&lt;BR /&gt;uint32_t val2 = (uint32_t)&amp;amp;val1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;// Error is specified in this line: Illegal&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;// some code&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using MC9S12ZVCA192 chip for my project.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Screenshot from the CodeWarrior 10.7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_5.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/75152i1C0BC6EABF70DBAC/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_5.png" alt="pastedImage_5.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 10:12:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873237#M7446</guid>
      <dc:creator>amitdhand</dc:creator>
      <dc:date>2019-02-20T10:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: Illegal constant expression: copying address to a variable</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873238#M7447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Amit,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The compilers are different ,how about use like below:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;uint val1;&lt;/P&gt;&lt;P&gt;uint *val2 = &amp;amp;val1;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2019 09:59:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Illegal-constant-expression-copying-address-to-a-variable/m-p/873238#M7447</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2019-02-21T09:59:09Z</dc:date>
    </item>
  </channel>
</rss>

