<?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のトピックRe: SEGGER J-Link script ResetTarget error: Invalid flash header detected</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/SEGGER-J-Link-script-ResetTarget-error-Invalid-flash-header/m-p/1518725#M194890</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/71022"&gt;@rshipman&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue is most definately referring to the flash on the target board. The pinmux option shouldnt be a major difference, like to cause this issue. I advice you to take a look into the following community post about flash headers. I believe it will prove very useful for your inquiry: &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Flash-Header-for-NAND-boot-on-i-MX51-platform/ta-p/1125664" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Flash-Header-for-NAND-boot-on-i-MX51-platform/ta-p/1125664&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;With respect to the RestoreFlexRAM function, could you specify where this function is used?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Edwin.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2022 20:29:16 GMT</pubDate>
    <dc:creator>EdwinHz</dc:creator>
    <dc:date>2022-09-07T20:29:16Z</dc:date>
    <item>
      <title>SEGGER J-Link script ResetTarget error: Invalid flash header detected</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SEGGER-J-Link-script-ResetTarget-error-Invalid-flash-header/m-p/1514717#M194547</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using a SEGGER J-Link to debug a target board based on the RT1021-EVK.&lt;/P&gt;&lt;P&gt;I have created a J-Link script based on the one in the SDK: SDK_2_12_0_EVK-MIMXRT1020\boards\evkmimxrt1020\demo_apps\hello_world&lt;/P&gt;&lt;P&gt;The problem is that when the J-Link server attempts to reset the target I see this error in the MCUXpresso console output for the J-Link Server:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;…&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Received monitor command: reset&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ResetTarget() start&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Invalid flash header detected.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Target halted on flash header read.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ResetTarget() end&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;AfterResetTarget() start&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;MPU was enabled and is now disabled.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;AfterResetTarget() end&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Resetting target&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Downloading 16016 bytes @ address 0x81000000 - Verify failed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Downloading 16096 bytes @ address 0x81003E90 - Verify failed&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;…&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;If I add the empty function ResetTarget() to my script, so that the reset does nothing, the script runs fine. Without the dummy ResetTarget() I get the above error.&lt;/P&gt;&lt;P&gt;So what does the error 'Invalid flash header detected.' actually mean? Presumably it is referring to the flash on the target board?&lt;/P&gt;&lt;P&gt;I should point out that the flash on our target board is connected to the FlexSPI secondary pinmux option of the RT1021, not the default one. Would that make a difference?&lt;/P&gt;&lt;P&gt;If that is the problem, how do I fix it please? For example, do I need to add to the J-Link script the pin routing, config and pad settings for the FlexSPI secondary pinmux? I don't remember having to do anything like this for the LinkServer/LPC-Link2 equivalent.&lt;/P&gt;&lt;P&gt;Why does the ResetTarget() function need to read the flash?&lt;/P&gt;&lt;P&gt;Also why does the hello_world script need RestoreFlexRAM()? My equivalent script seems to work fine without it. What is the purpose of this please?&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;Ronnie Shipman&lt;/P&gt;</description>
      <pubDate>Wed, 31 Aug 2022 14:51:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SEGGER-J-Link-script-ResetTarget-error-Invalid-flash-header/m-p/1514717#M194547</guid>
      <dc:creator>rshipman</dc:creator>
      <dc:date>2022-08-31T14:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: SEGGER J-Link script ResetTarget error: Invalid flash header detected</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/SEGGER-J-Link-script-ResetTarget-error-Invalid-flash-header/m-p/1518725#M194890</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/71022"&gt;@rshipman&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue is most definately referring to the flash on the target board. The pinmux option shouldnt be a major difference, like to cause this issue. I advice you to take a look into the following community post about flash headers. I believe it will prove very useful for your inquiry: &lt;A href="https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Flash-Header-for-NAND-boot-on-i-MX51-platform/ta-p/1125664" target="_blank"&gt;https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/Flash-Header-for-NAND-boot-on-i-MX51-platform/ta-p/1125664&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;With respect to the RestoreFlexRAM function, could you specify where this function is used?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR,&lt;/P&gt;
&lt;P&gt;Edwin.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 20:29:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/SEGGER-J-Link-script-ResetTarget-error-Invalid-flash-header/m-p/1518725#M194890</guid>
      <dc:creator>EdwinHz</dc:creator>
      <dc:date>2022-09-07T20:29:16Z</dc:date>
    </item>
  </channel>
</rss>

