<?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: MPC5748G Shared Memory Accross Core Only Works in Debug in MPC5xxx</title>
    <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070404#M27474</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/248653"&gt;@EmbeddedS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was this code really working in debug mode? &lt;/P&gt;
&lt;P&gt;I just load your elf files to my board (I didn't compile the projects again) and I can see that rxCAN is optimized out and it looks like the code in main.c does not correspond to elf file in the Z4_1 project. &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
    <pubDate>Fri, 28 Mar 2025 15:57:20 GMT</pubDate>
    <dc:creator>lukaszadrapa</dc:creator>
    <dc:date>2025-03-28T15:57:20Z</dc:date>
    <item>
      <title>MPC5748G Shared Memory Accross Core Only Works in Debug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070249#M27472</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I've created a project, that specifies a shared memory section in the flash across Core 0 (Z4_0) and Core 1 (Z4_1) of the MPC5748G development board.&lt;/P&gt;&lt;P&gt;I've configured LEDs PA10 and DS11 to represent Core 0 running properly. I've also configured LEDs PA7 and DS10 to represent Core 1 running properly. In Debug, there's no issue.&lt;/P&gt;&lt;P&gt;When i terminate the debug session and reconnect the board - my project fails.&lt;/P&gt;&lt;P&gt;If I comment out any shared memory section access, everything works in debug or standard.&lt;/P&gt;&lt;P&gt;What am i missing ? I've attached the project in this post.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 10:26:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070249#M27472</guid>
      <dc:creator>EmbeddedS</dc:creator>
      <dc:date>2025-03-28T10:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Shared Memory Accross Core Only Works in Debug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070404#M27474</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/248653"&gt;@EmbeddedS&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Was this code really working in debug mode? &lt;/P&gt;
&lt;P&gt;I just load your elf files to my board (I didn't compile the projects again) and I can see that rxCAN is optimized out and it looks like the code in main.c does not correspond to elf file in the Z4_1 project. &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;</description>
      <pubDate>Fri, 28 Mar 2025 15:57:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070404#M27474</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-03-28T15:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Shared Memory Accross Core Only Works in Debug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070612#M27475</link>
      <description>&lt;P&gt;This code definitely compiles and runs in debug mode.&lt;/P&gt;&lt;P&gt;Under "Z4_0 / Sources / shared_mem.c" rxCAN is defined as volatile. I may of commented out "rxCAN" the last time I compiled, for testing purposes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've linked Z4_0's compiled shared_func and shared_mem ".o" files under Z4_1's project properties. This was a hardcoded path on my machine, so will need to be changed for another machine.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you reference the code in main.c, is this for Z4_0 or Z4_1? I've changed my boot order to Z4_0 first if this is what's causing confusion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Mar 2025 10:17:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070612#M27475</guid>
      <dc:creator>EmbeddedS</dc:creator>
      <dc:date>2025-03-29T10:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: MPC5748G Shared Memory Accross Core Only Works in Debug</title>
      <link>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070959#M27481</link>
      <description>&lt;P&gt;Ok, I expected that the elf files are up to date. &lt;/P&gt;
&lt;P&gt;Anyway, it's caused by missing RAM initialization. &lt;/P&gt;
&lt;P&gt;Core Z4_0 initializes first 256KB by its startup file:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_0-1743409795175.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330470iB1B70774C5A680BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_0-1743409795175.png" alt="lukaszadrapa_0-1743409795175.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Core Z4_1 initializes&amp;nbsp; next 256KB:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_1-1743409825998.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330471iF4E998491765D40F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_1-1743409825998.png" alt="lukaszadrapa_1-1743409825998.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Remaining 256KB is usually initialized by Z2 core which is not present in your project... even if it is defined in project properties:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_2-1743409933768.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330473i51BAF0D3E3B11D34/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_2-1743409933768.png" alt="lukaszadrapa_2-1743409933768.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you put shared_memory to those last 256KB:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_3-1743410041809.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330474iA03E0B387DE3ACC3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_3-1743410041809.png" alt="lukaszadrapa_3-1743410041809.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;But it's not initialized:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lukaszadrapa_4-1743410088327.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/330475i59FD67F41E793D56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lukaszadrapa_4-1743410088327.png" alt="lukaszadrapa_4-1743410088327.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you use debugger in S32DS, it initializes whole RAM explicitly. If you run without debugger, it will crash on bus error when accessing uninitialized RAM. &lt;/P&gt;
&lt;P&gt;You need to ensure that also this RAM is initialized. &lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Lukas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 08:37:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/MPC5748G-Shared-Memory-Accross-Core-Only-Works-in-Debug/m-p/2070959#M27481</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2025-03-31T08:37:16Z</dc:date>
    </item>
  </channel>
</rss>

