<?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>S32 Design Studio中的主题 Re: S32DS 3.5 Debug issue with O3 optimization</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1813994#M11904</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203205"&gt;@Li_Chen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the following post. It has information related to the topic that might be useful to you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/Does-the-MCU-function-and-performance-exactly-same-for-O3-and-Os/td-p/1610886" target="_blank" rel="noopener"&gt;Is the MCU function and performance exactly the same for (-O3) and (-Os)?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
    <pubDate>Thu, 22 Feb 2024 17:32:13 GMT</pubDate>
    <dc:creator>VaneB</dc:creator>
    <dc:date>2024-02-22T17:32:13Z</dc:date>
    <item>
      <title>S32DS 3.5 Debug issue with O3 optimization</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1813011#M11891</link>
      <description>&lt;P&gt;I update my S32DS ID to 3.5 and running the&amp;nbsp;Port_Example_S32K344 example on&amp;nbsp;S32K3X4EVB-Q172 board using PEmicro Debugger. It works as expected, but If I changed&amp;nbsp;optimization level from -Os to -O3, I encountered the '&lt;SPAN&gt;Break at address "0x0" with no debug information available, or outside of program code&lt;/SPAN&gt;' error and cannot debug any more. I'm using&amp;nbsp;&lt;STRONG&gt;SW32K3_RTD_4.4_R21-11_3.0.0_D2303_DS_updatesite&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="debug_setting.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/264332iF5C7402B24D21401/image-size/medium?v=v2&amp;amp;px=400" role="button" title="debug_setting.png" alt="debug_setting.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="debug_error.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/264333iEC573BAE1EFD159B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="debug_error.png" alt="debug_error.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 21 Feb 2024 17:47:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1813011#M11891</guid>
      <dc:creator>Li_Chen</dc:creator>
      <dc:date>2024-02-21T17:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: S32DS 3.5 Debug issue with O3 optimization</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1813994#M11904</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/203205"&gt;@Li_Chen&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check the following post. It has information related to the topic that might be useful to you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32K/Does-the-MCU-function-and-performance-exactly-same-for-O3-and-Os/td-p/1610886" target="_blank" rel="noopener"&gt;Is the MCU function and performance exactly the same for (-O3) and (-Os)?&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;B.R.&lt;/P&gt;
&lt;P&gt;VaneB&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2024 17:32:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1813994#M11904</guid>
      <dc:creator>VaneB</dc:creator>
      <dc:date>2024-02-22T17:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: S32DS 3.5 Debug issue with O3 optimization</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1816800#M11939</link>
      <description>&lt;P&gt;I find the root cause is inside startup code. If change Optimization level to Os in the Startup_Code folder, the code could run as expected. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Startup_Os.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/265355iD42BCA6EB129C4DC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Startup_Os.png" alt="Startup_Os.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If Change to O3, the problem will happen after &lt;STRONG&gt;vldr d7, [r1] &lt;/STRONG&gt;instruction inside startup.c/init_data_bss function. This is corresponding to the c code&amp;nbsp;&lt;STRONG&gt;ram[j] = rom[j]; &lt;/STRONG&gt;where is to copy rom data from __INIT_INTERRUPT_START address 0x00400800 to&amp;nbsp;__RAM_INTERRUPT_START DTCM address 0x20000000. If using Os settup, the assembly is using different instruction &lt;SPAN&gt;&lt;STRONG&gt;ldr.w r7, [r1, r4, lsl #2]&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;str.w r7, [r0, r4, lsl #2]&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;Wondering If you have any better explanation or workaround about failure case if using O3 optimization.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="O3_1.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/265356i4F641952F2E3D6BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="O3_1.png" alt="O3_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 19:48:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1816800#M11939</guid>
      <dc:creator>Li_Chen</dc:creator>
      <dc:date>2024-02-27T19:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: S32DS 3.5 Debug issue with O3 optimization</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1817762#M11946</link>
      <description>Add volatile to those variables fix the issue:&lt;BR /&gt;volatile const uint32 * rom;&lt;BR /&gt;volatile const uint8 * rom8;&lt;BR /&gt;volatile uint32 * ram;&lt;BR /&gt;volatile uint8 * ram8;</description>
      <pubDate>Wed, 28 Feb 2024 18:19:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/S32DS-3-5-Debug-issue-with-O3-optimization/m-p/1817762#M11946</guid>
      <dc:creator>Li_Chen</dc:creator>
      <dc:date>2024-02-28T18:19:33Z</dc:date>
    </item>
  </channel>
</rss>

