<?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 Processor expert bug?? in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Processor-expert-bug/m-p/286725#M471</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am using the PE FLASH_LDD for Kinetis in CW 10.5 and it throws a compiler warning when I turn on optimization.&amp;nbsp; &lt;/P&gt;&lt;PRE class="jive-pre"&gt;IntFlashLdd1.c:550:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]&lt;/PRE&gt;&lt;P&gt;Here is the function that gets this warning:&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;P&gt;&lt;SPAN style="color: #ffcc00;"&gt;static void&lt;/SPAN&gt; &lt;SPAN style="font-weight: bolder;"&gt;SafeRoutineCaller&lt;/SPAN&gt;(&lt;SPAN style="color: #ffcc00;"&gt;void&lt;/SPAN&gt;) &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #efe0e0;"&gt;{&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;LDD_FLASH_TSafeRoutine SaveRoutineStackSpace; LDD_FLASH_TSafeRoutinePtr SafeRoutinePtr;&amp;nbsp; &lt;SPAN style="color: #00f5ff;"&gt;/* The safe routine must be aligned to 16bit word */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;SafeRoutinePtr = (LDD_FLASH_TSafeRoutinePtr)(((uint32_t)&amp;amp;SaveRoutineStackSpace + &lt;SPAN style="color: #8080ff;"&gt;1U&lt;/SPAN&gt;) &amp;amp; ~(uint32_t)&lt;SPAN style="color: #8080ff;"&gt;1U&lt;/SPAN&gt;); &lt;SPAN style="color: #00f5ff;"&gt;/* Copy the safe routine's code to a buffer on the stack */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;*(LDD_FLASH_TSafeRoutine *)(&lt;SPAN style="color: #ffcc00;"&gt;void&lt;/SPAN&gt; *)SafeRoutinePtr = *(LDD_FLASH_TSafeRoutine *)(&lt;SPAN style="color: #ffcc00;"&gt;void&lt;/SPAN&gt; *)&amp;amp;SafeRoutine; &lt;SPAN style="color: #00f5ff;"&gt;/* {Default RTOS Adapter} Critical section begin, general PE function is used */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bolder;"&gt;EnterCritical&lt;/SPAN&gt;(); ((LDD_FLASH_TSafeRoutinePtr)((uint32_t)(SafeRoutinePtr) | &lt;SPAN style="color: #8080ff;"&gt;1U&lt;/SPAN&gt;))(); &lt;SPAN style="color: #00f5ff;"&gt;/* Run the Safe routine */&lt;/SPAN&gt; &lt;SPAN style="color: #00f5ff;"&gt;/* {Default RTOS Adapter} Critical section end, general PE function is used */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bolder;"&gt;ExitCritical&lt;/SPAN&gt;(); &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #efe0e0;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would assume since this is automatically generated that I found a PE bug.&amp;nbsp; Can anyone help me?&lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp; clay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Mar 2014 20:16:00 GMT</pubDate>
    <dc:creator>claybarclay</dc:creator>
    <dc:date>2014-03-10T20:16:00Z</dc:date>
    <item>
      <title>Processor expert bug??</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Processor-expert-bug/m-p/286725#M471</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am using the PE FLASH_LDD for Kinetis in CW 10.5 and it throws a compiler warning when I turn on optimization.&amp;nbsp; &lt;/P&gt;&lt;PRE class="jive-pre"&gt;IntFlashLdd1.c:550:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]&lt;/PRE&gt;&lt;P&gt;Here is the function that gets this warning:&lt;/P&gt;&lt;PRE class="jive-pre"&gt;&lt;P&gt;&lt;SPAN style="color: #ffcc00;"&gt;static void&lt;/SPAN&gt; &lt;SPAN style="font-weight: bolder;"&gt;SafeRoutineCaller&lt;/SPAN&gt;(&lt;SPAN style="color: #ffcc00;"&gt;void&lt;/SPAN&gt;) &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #efe0e0;"&gt;{&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;LDD_FLASH_TSafeRoutine SaveRoutineStackSpace; LDD_FLASH_TSafeRoutinePtr SafeRoutinePtr;&amp;nbsp; &lt;SPAN style="color: #00f5ff;"&gt;/* The safe routine must be aligned to 16bit word */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;SafeRoutinePtr = (LDD_FLASH_TSafeRoutinePtr)(((uint32_t)&amp;amp;SaveRoutineStackSpace + &lt;SPAN style="color: #8080ff;"&gt;1U&lt;/SPAN&gt;) &amp;amp; ~(uint32_t)&lt;SPAN style="color: #8080ff;"&gt;1U&lt;/SPAN&gt;); &lt;SPAN style="color: #00f5ff;"&gt;/* Copy the safe routine's code to a buffer on the stack */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;*(LDD_FLASH_TSafeRoutine *)(&lt;SPAN style="color: #ffcc00;"&gt;void&lt;/SPAN&gt; *)SafeRoutinePtr = *(LDD_FLASH_TSafeRoutine *)(&lt;SPAN style="color: #ffcc00;"&gt;void&lt;/SPAN&gt; *)&amp;amp;SafeRoutine; &lt;SPAN style="color: #00f5ff;"&gt;/* {Default RTOS Adapter} Critical section begin, general PE function is used */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bolder;"&gt;EnterCritical&lt;/SPAN&gt;(); ((LDD_FLASH_TSafeRoutinePtr)((uint32_t)(SafeRoutinePtr) | &lt;SPAN style="color: #8080ff;"&gt;1U&lt;/SPAN&gt;))(); &lt;SPAN style="color: #00f5ff;"&gt;/* Run the Safe routine */&lt;/SPAN&gt; &lt;SPAN style="color: #00f5ff;"&gt;/* {Default RTOS Adapter} Critical section end, general PE function is used */&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: bolder;"&gt;ExitCritical&lt;/SPAN&gt;(); &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #efe0e0;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would assume since this is automatically generated that I found a PE bug.&amp;nbsp; Can anyone help me?&lt;/P&gt;&lt;P&gt; thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp; clay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Mar 2014 20:16:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Processor-expert-bug/m-p/286725#M471</guid>
      <dc:creator>claybarclay</dc:creator>
      <dc:date>2014-03-10T20:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: Processor expert bug??</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Processor-expert-bug/m-p/286726#M472</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you please upload your demo project and detail how to reproduce the problem with it? thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2014 01:22:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Processor-expert-bug/m-p/286726#M472</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2014-03-12T01:22:43Z</dc:date>
    </item>
  </channel>
</rss>

