<?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: m4 reload from linux fails in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705556#M109609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For anyone who comes across this in the future - the problem was in register SRC_M4RCR (0x3039_000C), which is used to stop and start the m4. The m4fwloader program is leaving the ENABLE_M4 bit set while the new firmware is written, but it needs to be disabled - otherwise the currently-running application may attempt to write to the same memory area as the new firmware.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2018 20:44:39 GMT</pubDate>
    <dc:creator>evanthompson</dc:creator>
    <dc:date>2018-05-03T20:44:39Z</dc:date>
    <item>
      <title>m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705551#M109604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On an i.mx7d, I can't get reloading the m4 from linux to work. I'm trying the utility from this blog post:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="2014" data-containertype="14" data-objectid="334393" data-objecttype="102" href="https://community.nxp.com/docs/DOC-334393"&gt;New i.MX6SX &amp;amp; i.MX7D AMP debugging tool: imx-m4fwloader&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is that swapping between 2 different m4 binaries does not work (reloading the same binary repeatedly does work). I'm using a stock sabre board and demo examples from the nxp bsp, so hopefully this will be easy to reproduce.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Setup to reproduce the issue:&lt;/P&gt;&lt;P&gt;i.mx7d sabre board with imx7d-sdb-m4 device tree&lt;/P&gt;&lt;P&gt;Copy these files to the sabre board:&lt;/P&gt;&lt;P&gt;m4fwloader binary from the above blog post&lt;/P&gt;&lt;P&gt;hello_world_ocram.bin example from nxp's FreeRTOS BSP&lt;/P&gt;&lt;P&gt;hello_world_2.bin, a second m4 binary that has one extra printf() call. Replace the hello_world main.c with the attached and rebuild hello_world_ocram. Rename the binary"hello_world_2.bin"&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Boot linux and run these commands:&lt;/P&gt;&lt;P&gt;./m4fwloader /path/to/hello_world_2.bin 0x910000&lt;/P&gt;&lt;P&gt;./m4fwloader /path/to/hello_world_ocram.bin 0x910000&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the first command, the m4 starts, and the messages print to the terminal.&lt;/P&gt;&lt;P&gt;After the second command, the m4 will not start.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-336088"&gt;main.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 00:04:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705551#M109604</guid>
      <dc:creator>evanthompson</dc:creator>
      <dc:date>2017-08-24T00:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705552#M109605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to do 'm4fwloader stop' first, then reload a binary then do 'm4fwloader start'.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Artur&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 11:51:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705552#M109605</guid>
      <dc:creator>art</dc:creator>
      <dc:date>2017-08-28T11:51:11Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705553#M109606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Artur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Running 'm4fwloader stop' and 'm4fwloader start' does not fix the problem. This is expected - if you look at the m4fwloader code, you will see that reloading a binary was already doing a stop and start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Evan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 20:04:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705553#M109606</guid>
      <dc:creator>evanthompson</dc:creator>
      <dc:date>2017-08-28T20:04:42Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705554#M109607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/mareknovak"&gt;mareknovak&lt;/A&gt;‌ , can you please help us here with your m4fwloader tool?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;Artur&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 09:30:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705554#M109607</guid>
      <dc:creator>art</dc:creator>
      <dc:date>2017-08-29T09:30:49Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705555#M109608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Artur,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any further ideas on this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Evan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Sep 2017 16:35:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705555#M109608</guid>
      <dc:creator>evanthompson</dc:creator>
      <dc:date>2017-09-11T16:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705556#M109609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For anyone who comes across this in the future - the problem was in register SRC_M4RCR (0x3039_000C), which is used to stop and start the m4. The m4fwloader program is leaving the ENABLE_M4 bit set while the new firmware is written, but it needs to be disabled - otherwise the currently-running application may attempt to write to the same memory area as the new firmware.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 20:44:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705556#M109609</guid>
      <dc:creator>evanthompson</dc:creator>
      <dc:date>2018-05-03T20:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705557#M109610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When ENABLE_M4 is set to "0" it seems like some of the memory doesn't get written. I am using the TCM for reference and I am guessing the ENABLE_M4 bit may disable the clock to that memory. Instead I am using the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="color: #51626f;"&gt;SW_M4C_NON_SCLR_RST&amp;nbsp;(bit 0) to hold the M4 in reset while I do the programming. The&amp;nbsp;reference manual and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;SPAN style="color: #51626f;"&gt;AN5317&amp;nbsp;&lt;/SPAN&gt;&lt;EM style="color: #51626f;"&gt;&lt;STRONG&gt;BADLY&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #51626f;"&gt;need to be updated to reflect a proper programming cycle when the M4 is already running. In my case&amp;nbsp;the M4 uses DDR (RPMSG and general memory). Occasionally without the M4 being held in reset it would crash BOTH&amp;nbsp;the A7 cores and the M4 rendering the system completely&amp;nbsp;dead.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 18:20:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705557#M109610</guid>
      <dc:creator>dogisfat</dc:creator>
      <dc:date>2018-09-05T18:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: m4 reload from linux fails</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705558#M109611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT&lt;/P&gt;&lt;P&gt;I've re-checked it now, and the original&lt;A _jive_internal="true" data-containerid="2014" data-containertype="14" data-content-finding="Community" data-objectid="334393" data-objecttype="102" href="https://community.nxp.com/docs/DOC-334393" style="color: #3d9ce7; background-color: #ffffff; border: 0px; padding: 1px 0px 1px calc(12px + 0.35ex);"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;imx-m4fwloader&lt;/A&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&amp;nbsp;app as referred to,&amp;nbsp; the author was from NXP, also didn't fully follow ap note as recommended.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;No full platform reset was issued, only core reset &amp;amp; hold (bit 0).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I kinda feel full platform reset is what one would want&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2018 22:52:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/m4-reload-from-linux-fails/m-p/705558#M109611</guid>
      <dc:creator>dry</dc:creator>
      <dc:date>2018-09-05T22:52:08Z</dc:date>
    </item>
  </channel>
</rss>

