<?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 RT Crossover MCUsのトピックRe: Program fails when accessing DTCM</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608686#M23979</link>
    <description>&lt;P&gt;An update...&lt;/P&gt;&lt;P&gt;Further debugging shows that a fault was taken (but the code then loops)...&lt;/P&gt;&lt;P&gt;Here is the Memory Configuration in MCUXpresso:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCUXpresso Memory Configuration" style="width: 965px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213052iF6E2244330290A97/image-size/large?v=v2&amp;amp;px=999" role="button" title="MemoryConfiguration.png" alt="MCUXpresso Memory Configuration" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MCUXpresso Memory Configuration&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the Linker configuration:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCUXpresso Linker Configuration" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213053iC56FE2C93BCD5619/image-size/large?v=v2&amp;amp;px=999" role="button" title="LinkerConfiguration.png" alt="MCUXpresso Linker Configuration" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MCUXpresso Linker Configuration&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the Bus Fault report:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bus Fault when accessing 0x20020800" style="width: 473px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213054i75BF186406FD9D35/image-size/large?v=v2&amp;amp;px=999" role="button" title="FaultRegisters.png" alt="Bus Fault when accessing 0x20020800" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Bus Fault when accessing 0x20020800&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It can be seen that the fault occurs when attempting to access 0x20020800.&amp;nbsp; &amp;nbsp; This address should be within the range of DTCM...&amp;nbsp; &amp;nbsp; &amp;nbsp;It almost appears that the system thinks that DTCM is only 128K bytes in length.&lt;/P&gt;&lt;P&gt;My assumption is that I only need to edit these tables (Memory configuration, linker configuration, etc.) and then do a project "clean" and a project "build".&amp;nbsp; &amp;nbsp; Are there other steps that I missed?&lt;/P&gt;&lt;P&gt;Did I configure something improperly?&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2023 18:52:37 GMT</pubDate>
    <dc:creator>CktDesigner</dc:creator>
    <dc:date>2023-03-02T18:52:37Z</dc:date>
    <item>
      <title>Program fails when accessing DTCM</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1607967#M23968</link>
      <description>&lt;P&gt;I'm using the MIMXRT1060-EVKB evaluation board, so the CPU being used is MIMXRT1062DVL6B.&lt;/P&gt;&lt;P&gt;So I expect the on chip SRAM to be 1 Mbyte or 0x100000&lt;/P&gt;&lt;P&gt;I'm also using MCUXpresso to develop code...&lt;/P&gt;&lt;P&gt;I have a program that instantiates a large uint8_t (byte) array.&lt;/P&gt;&lt;P&gt;The program works when using the "default" IDE settings (Execute out of SDRAM).&lt;/P&gt;&lt;P&gt;The program has a loop that marches through this large array.&lt;/P&gt;&lt;P&gt;However, my target application wants to execute out of ITCM and use DTCM for data.&lt;/P&gt;&lt;P&gt;I modified the MCU settings (C/C++ Build -&amp;gt; MCU settings) to have the following TCM regions:&lt;/P&gt;&lt;P&gt;SRAM_ITC&amp;nbsp; &amp;nbsp;Start at: 0x2000&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Size: 0x3E000&lt;/P&gt;&lt;P&gt;SRAM_DTC Start at: 0x20000000 Size: 0x80000&lt;/P&gt;&lt;P&gt;SRAM_OC&amp;nbsp; &amp;nbsp;Start at: 0x20200000 Size: 0x40000&lt;/P&gt;&lt;P&gt;SRAM_ITC_RESERVE Start at: 0x0&amp;nbsp; Size: 0x2000&lt;/P&gt;&lt;P&gt;So the sum of all of the SRAM sections is 0x100000&lt;/P&gt;&lt;P&gt;I also changed C/C++ Build -&amp;gt; Settings -&amp;gt; MCU Linker -&amp;gt; Managed Linker Settings&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Checked the "Link application to RAM"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Heap in SRAM_OC Region&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Stack in SRAM_DTC Region (Location Start)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;and added an extra-linker script input section:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;*(.bss*)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SRAM_DTC&lt;/P&gt;&lt;P&gt;When I build, everything links as expected.&lt;/P&gt;&lt;P&gt;When I run the TCM version, things start as expected, but the code "hangs" (no exceptions invoked).&lt;/P&gt;&lt;P&gt;Further debugging shows that when the DTCM accesses cross over the boundary between 0x2001feff to 0x20020800&amp;nbsp; (crossing over the 0x2001ffff to 0x20020000 boundary, accesses to DTCM fail.&lt;/P&gt;&lt;P&gt;Is there something else I need to do to "configure" the memory arrangement (beyond the setup in MCU settings)?&lt;/P&gt;&lt;P&gt;I also tried changing the "extra" linker statement to point all .bss to SDRAM (&amp;nbsp; *(.bss*)&amp;nbsp; BOARD_SDRAM ) and the program ran as expected... So the execution from ITCM seems to work.&amp;nbsp; &amp;nbsp; &amp;nbsp;But accessing beyond 0x2001ffff seems to cause a problem.&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2023 23:53:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1607967#M23968</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-03-01T23:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: Program fails when accessing DTCM</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608686#M23979</link>
      <description>&lt;P&gt;An update...&lt;/P&gt;&lt;P&gt;Further debugging shows that a fault was taken (but the code then loops)...&lt;/P&gt;&lt;P&gt;Here is the Memory Configuration in MCUXpresso:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCUXpresso Memory Configuration" style="width: 965px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213052iF6E2244330290A97/image-size/large?v=v2&amp;amp;px=999" role="button" title="MemoryConfiguration.png" alt="MCUXpresso Memory Configuration" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MCUXpresso Memory Configuration&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the Linker configuration:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MCUXpresso Linker Configuration" style="width: 999px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213053iC56FE2C93BCD5619/image-size/large?v=v2&amp;amp;px=999" role="button" title="LinkerConfiguration.png" alt="MCUXpresso Linker Configuration" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;MCUXpresso Linker Configuration&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here is the Bus Fault report:&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bus Fault when accessing 0x20020800" style="width: 473px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/213054i75BF186406FD9D35/image-size/large?v=v2&amp;amp;px=999" role="button" title="FaultRegisters.png" alt="Bus Fault when accessing 0x20020800" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Bus Fault when accessing 0x20020800&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It can be seen that the fault occurs when attempting to access 0x20020800.&amp;nbsp; &amp;nbsp; This address should be within the range of DTCM...&amp;nbsp; &amp;nbsp; &amp;nbsp;It almost appears that the system thinks that DTCM is only 128K bytes in length.&lt;/P&gt;&lt;P&gt;My assumption is that I only need to edit these tables (Memory configuration, linker configuration, etc.) and then do a project "clean" and a project "build".&amp;nbsp; &amp;nbsp; Are there other steps that I missed?&lt;/P&gt;&lt;P&gt;Did I configure something improperly?&lt;/P&gt;&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 18:52:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608686#M23979</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-03-02T18:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Program fails when accessing DTCM</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608754#M23984</link>
      <description>&lt;P&gt;It appears that changing MCU settings (in particular the memory configuration) doesn't update board.c&lt;/P&gt;&lt;P&gt;This is where the MPU (memory protection unit) gets set up.&amp;nbsp; &amp;nbsp; It looks like the DTCM region is limited here to 128K bytes...&lt;/P&gt;&lt;P&gt;Is there a configuration area that should be modified to change the contents of board.c?&amp;nbsp; &amp;nbsp;Or is it expected that board.c be edited manually?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 22:47:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608754#M23984</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-03-02T22:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: Program fails when accessing DTCM</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608782#M23986</link>
      <description>&lt;P&gt;I modified the MPU setup in "board.c" to reflect the sizes of ITCM, DTCM, and OC_SRAM.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It didn't seem to make a difference.&amp;nbsp; I still get a bus fault when accessing DTCM beyond the 128K boundary.&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 00:51:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1608782#M23986</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-03-03T00:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Program fails when accessing DTCM</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1609582#M24000</link>
      <description>&lt;P&gt;I now realize that filling out the memory configuration in MCU settings doesn't create the code to actually configure the I/D TCM.&amp;nbsp; &amp;nbsp; &amp;nbsp;So modifications need to be made in "start_mimxrt1062.c" to configure the SRAM banks...&amp;nbsp; &amp;nbsp; (And since the system is running from ITCM from boot, the bank loaded via the "default" fuse settings needs to stay the same...)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 01:17:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Program-fails-when-accessing-DTCM/m-p/1609582#M24000</guid>
      <dc:creator>CktDesigner</dc:creator>
      <dc:date>2023-03-06T01:17:10Z</dc:date>
    </item>
  </channel>
</rss>

