<?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: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1694084#M26075</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/150957"&gt;@dmckeever&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I modify the start address to 0x70020000, so&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingpan_0-1690452009595.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233903i1304ABCFC794666A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingpan_0-1690452009595.png" alt="jingpan_0-1690452009595.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and in flash_partition.h&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingpan_1-1690452038133.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233904i8DAEA4FF5F2AD6BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingpan_1-1690452038133.png" alt="jingpan_1-1690452038133.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I use MCUBootUtility to download signed image to flash. It works fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jul 2023 10:02:48 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2023-07-27T10:02:48Z</dc:date>
    <item>
      <title>Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to SRAM</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1685941#M25909</link>
      <description>&lt;P&gt;I am attempting to add OTA to my rt1064 application based on examples from the latest SDK . I am using MCUXpresso IDE v11.7.1&lt;BR /&gt;&lt;BR /&gt;I have modified my application to perform OTA upload and store signed bin file to secondary partition in flash; based on the evkmimxrt1064_lwip_httpssrv_ota_enet&amp;nbsp; example&lt;/P&gt;&lt;P&gt;I modified the start address to 0x70040400&lt;/P&gt;&lt;P&gt;I am now attempting to put the signed application image to the primary application partition, following method b) of the doc/readme,txt form the above example project:&lt;/P&gt;&lt;P&gt;- load the bootloader (successful, since terminal output is as expected)&lt;/P&gt;&lt;P&gt;- load the unsigned application using debugger then jump-start it by pause debugging and issue command 'jump ResetISR'&lt;BR /&gt;&lt;BR /&gt;The application begins to execute the ResetISR function but stalls in the for loop within data_init with a hard fault.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;__attribute__ ((section(".after_vectors.init_data")))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;void data_init(unsigned int romstart, unsigned int start, unsigned int len) {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;unsigned int *pulDest = (unsigned int*) start;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;unsigned int *pulsrc=(unsigned int*) romstart;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;unsigned int loop;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;for (loop = 0; loop &amp;lt; len; loop = loop + 4)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;*pulDest++ = *pulSrc++;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;The application with unmodified start address of 0x70000000 runs fine from the debugger&lt;EM&gt;:&lt;/EM&gt; the data sections are copied successfully from flash to RAM&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Can you suggest why running by jump-start from debugger could cause this issue?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 17:58:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1685941#M25909</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-07-11T17:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1687567#M25945</link>
      <description>&lt;P&gt;Further investigation. (Having set Opimization level to Optimize for Debug.)&lt;/P&gt;&lt;P&gt;Set breakpoint at for statement, ie after &lt;EM&gt;pulDest = (unsigned int*) start &lt;/EM&gt;has been executed.&lt;/P&gt;&lt;P&gt;Expression evaluation shows:&lt;/P&gt;&lt;P&gt;Name : start&lt;BR /&gt;Hex:0x8005a0a0&lt;STRONG&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Name : pulDest&lt;BR /&gt;Details:0x700426c4 &amp;lt;__section_table_start+12&amp;gt;&lt;BR /&gt;Hex:0x700426c4&lt;/P&gt;&lt;P&gt;So the address 0x8005a0a0 has been remapped to 0x700426c4 which is an address in flash&lt;/P&gt;&lt;P&gt;ie, pulDest is pointing to an address in flash and hence the subsequent assignment will cause the hard fault.&lt;BR /&gt;&lt;BR /&gt;Can anyone suggest how this remapping may have occurred?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 12:44:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1687567#M25945</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-07-13T12:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1688662#M25981</link>
      <description>&lt;P&gt;We have &lt;SPAN&gt;&lt;SPAN class=""&gt;discovered that the memory organization in the bootloader, plus location of stack and heap, must correspond with that in the application being jumped to / upgraded to. When these are brought into alignment the hard fault does not occur.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is puzzling. I would have assumed that when an application is started at its ResetISR entry point it configures all memory settings etc independently. But it appears that some setting(s) from the bootloader that is already running can be incompatible with the new application. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jul 2023 17:19:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1688662#M25981</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-07-14T17:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1690099#M26008</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/150957"&gt;@dmckeever&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;What do you mean of "&lt;SPAN&gt;correspond with&lt;/SPAN&gt;"? Can't change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 06:50:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1690099#M26008</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2023-07-21T06:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1690304#M26013</link>
      <description>&lt;P&gt;I mean that they must match:&lt;BR /&gt;- same memory blocks in same order&lt;BR /&gt;- same size of stack and heap&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2023 09:28:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1690304#M26013</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-07-21T09:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1694084#M26075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/150957"&gt;@dmckeever&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I modify the start address to 0x70020000, so&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingpan_0-1690452009595.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233903i1304ABCFC794666A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingpan_0-1690452009595.png" alt="jingpan_0-1690452009595.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and in flash_partition.h&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jingpan_1-1690452038133.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233904i8DAEA4FF5F2AD6BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jingpan_1-1690452038133.png" alt="jingpan_1-1690452038133.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I use MCUBootUtility to download signed image to flash. It works fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 10:02:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1694084#M26075</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2023-07-27T10:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1694132#M26076</link>
      <description>&lt;P&gt;Hi Jing&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;Bootloader v 1.9.0 memory details:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmckeever_0-1690454173652.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233911i9EEAF9887F624808/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmckeever_0-1690454173652.png" alt="dmckeever_0-1690454173652.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My application memory details:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmckeever_2-1690454365160.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233913i61E57DD142F7D666/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmckeever_2-1690454365160.png" alt="dmckeever_2-1690454365160.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;1. Use MCUXpresso to build and load bootloader&lt;/P&gt;&lt;P&gt;2. Use MCUXpresso to build and load application&lt;/P&gt;&lt;P&gt;3. Pause debugger. In Debugger Console, issue jump ResetISR. Application will not start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By reverting to bootloader 1.7.2 from an earlier SDK, I was able to bring its memory details into line with my app&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="dmckeever_3-1690454813921.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/233914iA071A5F7316F8174/image-size/medium?v=v2&amp;amp;px=400" role="button" title="dmckeever_3-1690454813921.png" alt="dmckeever_3-1690454813921.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;When this booloader 1.7.2 is loaded, the jump ResetISR to app works.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If I try to bring the memory details of latest bootloader 1.9.0 into line in the same way, then the bootloader itself does not start.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2023 10:53:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1694132#M26076</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-07-27T10:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1696495#M26141</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/150957"&gt;@dmckeever&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;You can use MCUBootUtility to download signed image to 0x70040000.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 08:00:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1696495#M26141</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2023-08-01T08:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1696651#M26147</link>
      <description>&lt;P&gt;Hi Jing&lt;BR /&gt;&lt;BR /&gt;Thank you for the reply. I understand that I can use MCUBootUtility to download the signed image.&lt;BR /&gt;&lt;BR /&gt;I have yet to confirm whether when using the bootloader and app combination where the jump ResetISR does not start the app, the bootloader will subsequently be able to start a downloaded signed app.&lt;BR /&gt;&lt;BR /&gt;However, what I cannot yet understand is the following: why should it matter if the bootloader and app are different in their memory block usage or in any other properties?&lt;/P&gt;&lt;P&gt;When jump ResetISR fails to start the app when bootloader is already running, it appears that there must be some residual configuration of the system arising from the execution of the bootloader that is not overwritten by the initialization sequence in the app that is performed by the ResetISR function. What can this be?&lt;/P&gt;&lt;P&gt;My app is built from SDK examples; my understanding is that it should perform all necessary initialization to configure the system to the required state for its execution.&lt;BR /&gt;&lt;BR /&gt;Any explanations or suggestions will be welcome.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2023 10:23:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1696651#M26147</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-08-01T10:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1698523#M26191</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/150957"&gt;@dmckeever&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I use SDK2.13. Change the Heap and stack to itcm, and also the size. But it still can run by "jump ResetISR"...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Jing&lt;/P&gt;</description>
      <pubDate>Thu, 03 Aug 2023 10:17:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1698523#M26191</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2023-08-03T10:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1738828#M27215</link>
      <description>&lt;P&gt;I have at last found an explanation based on information in this topic:&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/i-MX-RT/How-to-jump-to-application-from-custom-bootloader-where-both-are/m-p/1078575#M9127" target="_blank"&gt;https://community.nxp.com/t5/i-MX-RT/How-to-jump-to-application-from-custom-bootloader-where-both-are/m-p/1078575#M9127&lt;/A&gt;&lt;/P&gt;&lt;P&gt;My application has&amp;nbsp; XIP_BOOT_HEADER_DCD_ENABLE=1&amp;nbsp; and the evkmimxrt1064_mcuboot_opensource&amp;nbsp; project from the SDK does not have this setting. So the SDRAM is not configured when my application is jumped to, and so it stalls in the for loop within data_init with a hard fault.&lt;BR /&gt;&lt;BR /&gt;I have modified the mcuboot project:&lt;BR /&gt;- added preprocessor symbols XIP_BOOT_HEADER_DCD_ENABLE=1&amp;nbsp; and SKIP_SYSCLK_INIT&lt;/P&gt;&lt;P&gt;- copied dcd.c from my application to ensure that they match&lt;/P&gt;&lt;P&gt;The application now starts using jump ResetISR&lt;BR /&gt;&lt;BR /&gt;( I think that the documentation of the mcuboot opensource project in SDK should be enhanced to explain the necessity of XIP_BOOT_HEADER_DCD_ENABLE=1 to match the application)&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 17:06:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1738828#M27215</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-10-12T17:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1738830#M27216</link>
      <description>&lt;P&gt;I have a remaining problem.&lt;BR /&gt;&lt;BR /&gt;The application loaded at 0x70040400&amp;nbsp; when started by jump ResetISR is behaving differently from the "standalone" version loaded at address 0x70000000 (ie with no bootloader present): it is stalling during ethernet access.&lt;BR /&gt;&lt;BR /&gt;Is there any other property of the runtime environment that might not be set properly after jump ResetrISR?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Oct 2023 17:12:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1738830#M27216</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-10-12T17:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hard Fault in ResetISR function when executing data_init() to copy data sections from flash to S</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1740563#M27238</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Changing code location in XIP Flash causes program failure.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;I have done further experiments to try to determine why the application loaded at 0x70040400 (for starting via bootloader) is behaving differently from the "standalone" version loaded at address 0x70000000 .&lt;BR /&gt;&lt;BR /&gt;The difference is that the "bad" version fails: it stalls during &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;sys_check_timeouts()&lt;/FONT&gt;&lt;/STRONG&gt; in the LWIP code and the debugger loses control. The standalone version is "good" in that its execution continues without stalling.&lt;/P&gt;&lt;P&gt;To test if is is a code location issue, or an issue with the runtime environment set up for app execution, I took the "good" standalone version, temporarily disabled managed linker scripts, and added a padding directive as follows to the .ld file:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;/* Image Vector Table and Boot Data for booting from external flash */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;.boot_hdr : ALIGN(4)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FILL(0xff)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;__boot_hdr_start__ = ABSOLUTE(.) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;KEEP(*(.boot_hdr.conf))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;. = 0x1000 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;KEEP(*(.boot_hdr.ivt))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;. = 0x1020 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;KEEP(*(.boot_hdr.boot_data))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;. = 0x1030 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;KEEP(*(.boot_hdr.dcd_data))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;__boot_hdr_end__ = ABSOLUTE(.) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;. = 0x2000 ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;. = 0x40400 ;&amp;nbsp; /* Add padding to load next section at 0x70040400 */&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;} &amp;gt;PROGRAM_FLASH&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;/* MAIN TEXT SECTION */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;.text : ALIGN(4)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;{&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FILL(0xff)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;__vectors_start__ = ABSOLUTE(.) ;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;This aligned the main text section in the modified "good" version to load at &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;0x70040400, &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;ie same as "bad" version. Extract from .map file to show this:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;0x00002000 . = 0x2000&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;*fill* 0x70001460 0xba0 ff&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0x00040400 . = 0x40400&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;*fill* 0x70002000 0x3e400 ff&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;.text 0x70040400 0xc7734&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;FILL mask 0xff&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0x70040400 __vectors_start__ = ABSOLUTE (.)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;*(SORT_BY_ALIGNMENT(.isr_vector))&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;.isr_vector 0x70040400 0x2b8 ./startup/startup_mimxrt1064.o&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0x70040400 g_pfnVectors&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0x70040400 __Vectors&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0x700406b8 . = ALIGN (0x4)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;The remaining functions in the modified "good" version are loaded at addresses corresponding to those in the "bad" version&lt;BR /&gt;&lt;BR /&gt;The modified "good" version with padding now fails in the same way as the "bad" version . Aside from the addition of padding, no other changes were made. So it appears to be a code location issue.&lt;BR /&gt;&lt;BR /&gt;Can anyone suggest how changing the location of code in XIP flash could make a difference to program execution?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 16:43:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Hard-Fault-in-ResetISR-function-when-executing-data-init-to-copy/m-p/1740563#M27238</guid>
      <dc:creator>dmckeever</dc:creator>
      <dc:date>2023-10-16T16:43:27Z</dc:date>
    </item>
  </channel>
</rss>

