<?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: MIMXRT1170 - Crash when trying to copy program from FLASH to SRAM in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1822740#M220876</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me confirm the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You are using RT1170-EVK with a multi-core project&lt;/LI&gt;
&lt;LI&gt;You are using SDK 2.15.000&lt;/LI&gt;
&lt;LI&gt;Basically, what you are trying to do it to run the multicore &lt;EM&gt;hello_world &lt;/EM&gt;using &lt;A href="https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/How-to-move-CM4-core-project-to-SDRAM-in-RT1176/ta-p/1363185" target="_blank"&gt;How to move CM4 core project to SDRAM in RT1176&lt;/A&gt;, am I right? But this is not working on your side&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
    <pubDate>Wed, 06 Mar 2024 22:07:06 GMT</pubDate>
    <dc:creator>DanielRuvalcaba</dc:creator>
    <dc:date>2024-03-06T22:07:06Z</dc:date>
    <item>
      <title>MIMXRT1170 - Crash when trying to copy program from FLASH to SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1822628#M220866</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using MIMXRT1170-EVK board with the MIMXRT1176 MCU. I'm using both cores, CM7 is supposed to do some math, CM4 is supposed to handle things like communications, timers etc. I'm currently trying to move CM4 program into the SDRAM but I'm constantly running into problems.&lt;/P&gt;&lt;P&gt;The project is built on "hello_world" multicore example. I have one simple one (basically the example) where I followed &lt;A href="https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/How-to-move-CM4-core-project-to-SDRAM-in-RT1176/ta-p/1363185" target="_self"&gt;this guide&lt;/A&gt;&amp;nbsp;and everything seems like it's working. However when it comes to this project (which is old one converted into SDK 2.15.00 and built on "hello_world" project too) I can't go past copying data sections from FLASH to SRAM. It's the process that is happening in the `ResetISR()` right after `SystemInit()`.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After some spent time on it, I have honestly no idea why it doesn't wanna work as the "simple" project.. And I'm pretty convinced I already checked every difference between these two projects. But somehow it's still not working and I can't figure out why since I already removed some custom libraries etc. so both of the projects are now "hello_world" projects where CM4 is moved into SDRAM.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The exact behaviour looks like this:&lt;/P&gt;&lt;P&gt;- Each of these memory segments are getting initialized just fine except the "SDRAM"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalKv_1-1709742371770.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266832i18F8FF3865F9CA2C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalKv_1-1709742371770.png" alt="MichalKv_1-1709742371770.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- When it comes to the SDRAM inside the `data_init()` function:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalKv_2-1709742429768.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266833iEB09DAD99280E698/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalKv_2-1709742429768.png" alt="MichalKv_2-1709742429768.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the `*pullSrc` is written only on the first address (aka 0x80000000) then it moves to address 0x80000004 and crashes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks to me like there's some write access violation or something like that but still I can't figure out what is the missing piece. Or where else to look.&lt;BR /&gt;&lt;BR /&gt;I already checked the differences in:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;All the project properties for each core&lt;/LI&gt;&lt;LI&gt;Debug configuration&lt;/LI&gt;&lt;LI&gt;`_Debug.ld` file&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;and everything looks pretty much fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope someone has an idea what am I doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 16:32:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1822628#M220866</guid>
      <dc:creator>MichalKv</dc:creator>
      <dc:date>2024-03-06T16:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: MIMXRT1170 - Crash when trying to copy program from FLASH to SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1822740#M220876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me confirm the following:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;You are using RT1170-EVK with a multi-core project&lt;/LI&gt;
&lt;LI&gt;You are using SDK 2.15.000&lt;/LI&gt;
&lt;LI&gt;Basically, what you are trying to do it to run the multicore &lt;EM&gt;hello_world &lt;/EM&gt;using &lt;A href="https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/How-to-move-CM4-core-project-to-SDRAM-in-RT1176/ta-p/1363185" target="_blank"&gt;How to move CM4 core project to SDRAM in RT1176&lt;/A&gt;, am I right? But this is not working on your side&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Daniel.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 22:07:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1822740#M220876</guid>
      <dc:creator>DanielRuvalcaba</dc:creator>
      <dc:date>2024-03-06T22:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: MIMXRT1170 - Crash when trying to copy program from FLASH to SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1823052#M220893</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/198556"&gt;@DanielRuvalcaba&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;to answer your questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;You are using RT1170-EVK with a multi-core project&amp;nbsp;&lt;/STRONG&gt; - Yes&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;You are using SDK 2.15.000&amp;nbsp;&lt;/STRONG&gt;- Yes&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Basically, what you are trying to do it to run the multicore&amp;nbsp;&lt;EM&gt;hello_world&amp;nbsp;&lt;/EM&gt;using&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/How-to-move-CM4-core-project-to-SDRAM-in-RT1176/ta-p/1363185" target="_blank" rel="noopener"&gt;How to move CM4 core project to SDRAM in RT1176&lt;/A&gt;, am I right? But this is not working on your side&amp;nbsp;&lt;/STRONG&gt;- It's kinda more complicated than that:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In general - yes, I'm trying to run&amp;nbsp;&lt;EM&gt;multicore hello_world&lt;/EM&gt; project using the "moving" guide and it's not working on my side&amp;nbsp;&lt;STRONG&gt;BUT&lt;/STRONG&gt; I have one project that is working (pure &lt;EM&gt;hello_world &lt;/EM&gt;multicore example + the moving implementation)&amp;nbsp;and second one that isn't even due to the fact I followed the exact same guide, I made sure that the first project is, in properties/configuration, the exact same, the only difference is that there's much more SDK components included on the CM4 side. But to find out what's wrong I already commented each included library that is different from the original&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; project but without any luck to find out what's wrong (as I would expect - if the library/component isn't used at all the compiler will just do nothing with them so they act like there's no additional component - but maybe that's the wrong idea since it might do something in the Config Tool? I'm pretty new to the whole MCUXpresso and NXP MCUs).&amp;nbsp;&lt;/P&gt;&lt;P&gt;When it comes to CM7 core, that's exactly the same - there should be no difference from the original&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; example. But somehow&amp;nbsp;&lt;STRONG&gt;this&lt;/STRONG&gt; core is crashing when it comes to moving program from FLASH to SDRAM where the CM4 program should be (after this operation of course).&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;EDIT 1:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Debugger:&lt;/STRONG&gt; J-link Segger Plus compact&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;After some debugging today I'm experiencing some weird behaviour and &lt;STRONG&gt;probably found the problem but don't know how is it caused&lt;/STRONG&gt;. Basically I checked the memory (break right before writing to the &lt;EM&gt;0x80000000&lt;/EM&gt; memory space (SDRAM))&amp;nbsp;and when it comes to the simple &lt;EM&gt;hello_world&lt;/EM&gt; example it looks like that:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalKv_0-1709803728121.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266967i9B4635C19FFDD762/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalKv_0-1709803728121.png" alt="MichalKv_0-1709803728121.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Everything seems fine to me, there're some data etc. so I guess that's fine. However when it comes to the main project, then it looks like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalKv_1-1709803815652.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/266968iA4C37F5EA52078DB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalKv_1-1709803815652.png" alt="MichalKv_1-1709803815652.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So it looks like the SDRAM isn't initialized. But there's still like 5-10% chance I get the `????????` value one the&amp;nbsp;&lt;EM&gt;0x30009560&amp;nbsp;&lt;/EM&gt;address and further on when using Memory monitor (it might be just some IDE thing - or what scares me more the memory is never initialized and the saved values are somehow from previous debug session of the&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; example - it goes to such a hard fault that I have to:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;change onboard SW1 to - 0001&lt;/LI&gt;&lt;LI&gt;boot&amp;nbsp;&lt;EM&gt;hello_world&amp;nbsp;&lt;/EM&gt;example&lt;/LI&gt;&lt;LI&gt;change ondboard SW1 to - 0010&lt;/LI&gt;&lt;LI&gt;begin another&amp;nbsp;&lt;EM&gt;main project&lt;/EM&gt; debugging&amp;nbsp;).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;What's also weird is the `len` value (or even the adress value - it's the same thing) which shows that even when I commented the libraries and I'm not using anything more than&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; example at the moment, the&amp;nbsp;&lt;EM&gt;Main project&lt;/EM&gt; is larger for almost 10kB. And since the `pulSrc` value is different before the SDRAM write, it means either (or these are the scenerious I can imagine):&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;?? The commented libraries are still part of the project even tho noone uses them&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;The CM7 part is the larger part of project even when it's coppied&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; example - doesn't make any sense - I thought there might be something wrong with the memory setup and the sizes of memory space but it's the same for each project&lt;/LI&gt;&lt;LI&gt;The program starts at further FLASH address (which would be really strange bcs there should be nothing before - except the vectors etc.) - but I guess even in case the compiler for some reason move the program to further address &lt;STRONG&gt;it still shouldn't be a problem&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;About the SDRAM - I saw some articles about initializing SDRAM through the j-link script. I never tried one but also it can't get out of my head that the&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; example isn't using one either and the SDRAM in&amp;nbsp;&lt;EM&gt;hello_world&lt;/EM&gt; project seems pretty initialized to me and according to the the CM4 debug picture shown below the CM4 part is in the SDRAM&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalKv_0-1709806695295.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/267003i8E0383ECE2392D51/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalKv_0-1709806695295.png" alt="MichalKv_0-1709806695295.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but when I'm debugging the&amp;nbsp;&lt;EM&gt;main&lt;/EM&gt;&amp;nbsp;&lt;EM&gt;project&lt;/EM&gt; CM4 part (it gets stuck at MCMGR_EarlyInit() waiting for TX register to be empty) it still shows the reset vector at the almost same spot..&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MichalKv_1-1709807112542.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/267004iDEFD04A04A517F68/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MichalKv_1-1709807112542.png" alt="MichalKv_1-1709807112542.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So.. I'm pretty much confused.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Michal.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 10:25:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1823052#M220893</guid>
      <dc:creator>MichalKv</dc:creator>
      <dc:date>2024-03-07T10:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: MIMXRT1170 - Crash when trying to copy program from FLASH to SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1823323#M220918</link>
      <description>&lt;P&gt;Well.. funny enough - I spent hours of trying to understand this whole "booting" procedure etc. to find out the defined macro should be&amp;nbsp;DXIP_BOOT_HEADER_DC&lt;STRONG&gt;D&lt;/STRONG&gt;_ENABLE and &lt;STRONG&gt;not&lt;/STRONG&gt;&amp;nbsp;DXIP_BOOT_HEADER_DC&lt;STRONG&gt;B&lt;/STRONG&gt;_ENABLE .&lt;/P&gt;&lt;P&gt;I just randomly found this out while trying to compare each important file of the projects again. So it was a typo mistake this whole time..&lt;/P&gt;&lt;P&gt;Anyways thanks for your time and I'm going to buy some glasses I guess.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 12:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIMXRT1170-Crash-when-trying-to-copy-program-from-FLASH-to-SRAM/m-p/1823323#M220918</guid>
      <dc:creator>MichalKv</dc:creator>
      <dc:date>2024-03-07T12:07:09Z</dc:date>
    </item>
  </channel>
</rss>

