<?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: Unable to use breakpoints on iMX7D when firmware placed in OCRAM... in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739559#M115080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From following the discussion on that thread and what Segger reply was, the issue is the LMEM and the cache.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the system cache init code I pasted needs to be disabled to use J-Link.&amp;nbsp; They also say you need to disable code cache but in my tests so far I didn't see it improving anything.&amp;nbsp; System cache is the one.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Bernhard, Carlos, Igor - thanks for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2018 08:13:37 GMT</pubDate>
    <dc:creator>dry</dc:creator>
    <dc:date>2018-04-23T08:13:37Z</dc:date>
    <item>
      <title>Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739553#M115074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using iMX7D (Sabre board, or other with same SoC), and Segger's JLink for JTAG debugger.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using M4's BSP as provided by NXP, with FreeRTOS:&amp;nbsp;FreeRTOS_BSP_1.0.1_iMX7D.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have problem with debugging applications when I link &amp;amp; place the code into OCRAM.&amp;nbsp; Refer to provided by NXP sample linker script in the BSP -&amp;nbsp;MCIMX7D_M4_ocram.ld&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the provided in the BSP Hello world sample, if linked to OCRAM, the code will run, but I cannot set breakpoints &amp;amp; debug because, once any of the breakpoints are hit starting from main(), the CPU will not run further, it will just stay halted on teh break point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The culprit appears the cache usage. Ref. SystemInit() in system_MCIMX7D_M4.c:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt;......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt;/* Initialize Cache */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; /* Enable System Bus Cache */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; /* set command to invalidate all ways, enable write buffer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; and write GO bit to initiate command */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; LMEM_PSCCR = LMEM_PSCCR_INVW1_MASK | LMEM_PSCCR_INVW0_MASK;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; LMEM_PSCCR |= LMEM_PSCCR_GO_MASK;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; /* wait until the command completes */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; while (LMEM_PSCCR &amp;amp; LMEM_PSCCR_GO_MASK);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; /* Enable cache, enable write buffer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; LMEM_PSCCR = (LMEM_PSCCR_ENWRBUF_MASK | LMEM_PSCCR_ENCACHE_MASK);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; __DSB();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt; __ISB();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11px; color: #0000ff;"&gt;......&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If I disable / skip entirely this cache initialization, then the breakpoints are working again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help with this issue?&amp;nbsp; How do I keep using Cache, yet also able to actually debug the code ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 12:10:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739553#M115074</guid>
      <dc:creator>dry</dc:creator>
      <dc:date>2018-04-17T12:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739554#M115075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is already thread about a similar topic, maybe it helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/879246"&gt;https://community.nxp.com/message/879246&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bernhard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 10:08:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739554#M115075</guid>
      <dc:creator>bernhardfink</dc:creator>
      <dc:date>2018-04-19T10:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739555#M115076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Bernhard,&lt;/P&gt;&lt;P&gt;The issue looks same.&amp;nbsp;But I don't see atm anyone got an answer of how to avoid it or 'fix' it.&lt;/P&gt;&lt;P&gt;Will read in details.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 10:23:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739555#M115076</guid>
      <dc:creator>dry</dc:creator>
      <dc:date>2018-04-19T10:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739556#M115077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi D. RY,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you see this behavior only when running from OCRAM? Have you tried a different debugger?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Carlos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Apr 2018 19:43:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739556#M115077</guid>
      <dc:creator>Carlos_Musich</dc:creator>
      <dc:date>2018-04-20T19:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739557#M115078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;The memory I tried:&amp;nbsp; TCM, and OCRAM. In both scenarios, all linker maps exactly as from NXP examples.&lt;/P&gt;&lt;P&gt;Problem encountered when using OCRAM, as described above and on the thread Berhhard referred to - looks exactly same issue.&lt;/P&gt;&lt;P&gt;No problems with TCM.&lt;/P&gt;&lt;P&gt;I do not have other HW debugger to try.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have not tested with DDR mapping. I would expect that, if the cache'able 2MB area is used it will have the same issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2018 03:20:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739557#M115078</guid>
      <dc:creator>dry</dc:creator>
      <dc:date>2018-04-22T03:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739558#M115079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi D. RY&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;may be useful to look at segger specific M4 issues with cache usage on i.MX6SX &lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://forum.segger.com/index.php?page=Thread&amp;amp;postID=10965&amp;amp;highlight=MX6+M4+cache" title="http://forum.segger.com/index.php?page=Thread&amp;amp;postID=10965&amp;amp;highlight=MX6+M4+cache"&gt;[SOLVED] DEBUGGING doesn't work in external RAM, but in internal RAM - J-Link/Flasher related - SEGGER Forum&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2018 22:53:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739558#M115079</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2018-04-22T22:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to use breakpoints on iMX7D when firmware placed in OCRAM...</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739559#M115080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Igor,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From following the discussion on that thread and what Segger reply was, the issue is the LMEM and the cache.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the system cache init code I pasted needs to be disabled to use J-Link.&amp;nbsp; They also say you need to disable code cache but in my tests so far I didn't see it improving anything.&amp;nbsp; System cache is the one.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Bernhard, Carlos, Igor - thanks for help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2018 08:13:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Unable-to-use-breakpoints-on-iMX7D-when-firmware-placed-in-OCRAM/m-p/739559#M115080</guid>
      <dc:creator>dry</dc:creator>
      <dc:date>2018-04-23T08:13:37Z</dc:date>
    </item>
  </channel>
</rss>

