<?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>i.MX Processors中的主题 MIMX8MM_CM4 Issue Debugging from DDR</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/MIMX8MM-CM4-Issue-Debugging-from-DDR/m-p/1193527#M165951</link>
    <description>&lt;P&gt;Host OS: Windows 10&lt;/P&gt;&lt;P&gt;Debug Probe: Segger J-link Ultra+&lt;/P&gt;&lt;P&gt;SDK Version: &lt;SPAN&gt;2.7.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Eval Board: 8MMINILPD4-EVK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Introduction:&lt;/P&gt;&lt;P&gt;I am having some difficulty debugging the SDK's hello world program from DDR on the Cortex M4. Similar issues have arisen before for others on the imx6, as documented&amp;nbsp;&lt;A href="https://forum.segger.com/index.php/Thread/2948-SOLVED-DEBUGGING-doesn-t-work-in-external-RAM-but-in-internal-RAM/?postID=11144&amp;amp;highlight=LMEM#post11144" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/i-MX6SoloX-DDR-debug-problem-with-Segger-JLink/m-p/506194" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;.&amp;nbsp; In the referenced issues, the jtag debugger was setting software breakpoints in DDR instead of the cache, leading to some undesirable inconsistencies when the cache was enabled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case, the debugger immediately steps to 0xdeadbeef on the very first instruction of the reset vector. The reset value of the LMEM enable at 0xe0082000 is zero according to the TRM. Furthermore, the hello world program does not enable the cache until the SystemInit call. For these reasons, I am inclined to think that my problem is a bit different from the imx6 issues.&lt;/P&gt;&lt;P&gt;GDB works as desired when running the program out of TCM.&lt;/P&gt;&lt;P&gt;Does anyone have an inkling as to what is going on here?&lt;/P&gt;&lt;P&gt;To reproduce:&lt;/P&gt;&lt;P&gt;-follow setup steps from the getting started guide.&lt;BR /&gt;-eliminate cache setup code as outlined in one of the linked posts. (I only included this for completeness. This step should not affect any behavior since execution never reaches the cache initialization section.)&lt;BR /&gt;-follow the steps on the getting started guide to load the program&lt;BR /&gt;for both the ddr_debug and debug images.&lt;BR /&gt;-attempt a single step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are a pair of screenshots showing the differing behavior for DDR and TCM based code. I reset power on the unit between tests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;DDR:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ddr_debug_gdbprintout.jpg" style="width: 946px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131770i5E1657035071D84E/image-size/large?v=v2&amp;amp;px=999" role="button" title="ddr_debug_gdbprintout.jpg" alt="ddr_debug_gdbprintout.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;TCM RAM:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ram_printout.jpg" style="width: 735px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131771i8AC4CDDE63E94F81/image-size/large?v=v2&amp;amp;px=999" role="button" title="ram_printout.jpg" alt="ram_printout.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EDIT: I should also add that the DDR program runs normally when no breakpoints are enabled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 23:59:23 GMT</pubDate>
    <dc:creator>pbloemer</dc:creator>
    <dc:date>2020-12-03T23:59:23Z</dc:date>
    <item>
      <title>MIMX8MM_CM4 Issue Debugging from DDR</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/MIMX8MM-CM4-Issue-Debugging-from-DDR/m-p/1193527#M165951</link>
      <description>&lt;P&gt;Host OS: Windows 10&lt;/P&gt;&lt;P&gt;Debug Probe: Segger J-link Ultra+&lt;/P&gt;&lt;P&gt;SDK Version: &lt;SPAN&gt;2.7.0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Eval Board: 8MMINILPD4-EVK&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Introduction:&lt;/P&gt;&lt;P&gt;I am having some difficulty debugging the SDK's hello world program from DDR on the Cortex M4. Similar issues have arisen before for others on the imx6, as documented&amp;nbsp;&lt;A href="https://forum.segger.com/index.php/Thread/2948-SOLVED-DEBUGGING-doesn-t-work-in-external-RAM-but-in-internal-RAM/?postID=11144&amp;amp;highlight=LMEM#post11144" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;and&amp;nbsp;&lt;A href="https://community.nxp.com/t5/i-MX-Processors/i-MX6SoloX-DDR-debug-problem-with-Segger-JLink/m-p/506194" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;.&amp;nbsp; In the referenced issues, the jtag debugger was setting software breakpoints in DDR instead of the cache, leading to some undesirable inconsistencies when the cache was enabled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case, the debugger immediately steps to 0xdeadbeef on the very first instruction of the reset vector. The reset value of the LMEM enable at 0xe0082000 is zero according to the TRM. Furthermore, the hello world program does not enable the cache until the SystemInit call. For these reasons, I am inclined to think that my problem is a bit different from the imx6 issues.&lt;/P&gt;&lt;P&gt;GDB works as desired when running the program out of TCM.&lt;/P&gt;&lt;P&gt;Does anyone have an inkling as to what is going on here?&lt;/P&gt;&lt;P&gt;To reproduce:&lt;/P&gt;&lt;P&gt;-follow setup steps from the getting started guide.&lt;BR /&gt;-eliminate cache setup code as outlined in one of the linked posts. (I only included this for completeness. This step should not affect any behavior since execution never reaches the cache initialization section.)&lt;BR /&gt;-follow the steps on the getting started guide to load the program&lt;BR /&gt;for both the ddr_debug and debug images.&lt;BR /&gt;-attempt a single step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below are a pair of screenshots showing the differing behavior for DDR and TCM based code. I reset power on the unit between tests.&amp;nbsp;&lt;/P&gt;&lt;P&gt;DDR:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ddr_debug_gdbprintout.jpg" style="width: 946px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131770i5E1657035071D84E/image-size/large?v=v2&amp;amp;px=999" role="button" title="ddr_debug_gdbprintout.jpg" alt="ddr_debug_gdbprintout.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;TCM RAM:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ram_printout.jpg" style="width: 735px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/131771i8AC4CDDE63E94F81/image-size/large?v=v2&amp;amp;px=999" role="button" title="ram_printout.jpg" alt="ram_printout.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;EDIT: I should also add that the DDR program runs normally when no breakpoints are enabled.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 23:59:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/MIMX8MM-CM4-Issue-Debugging-from-DDR/m-p/1193527#M165951</guid>
      <dc:creator>pbloemer</dc:creator>
      <dc:date>2020-12-03T23:59:23Z</dc:date>
    </item>
  </channel>
</rss>

