<?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>MCUXpresso IDEのトピックDebugging a relocated target application</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1670460#M9044</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;MCUXpresso 11.6.0 [Build 8187] [2022-07-13]&lt;BR /&gt;mimxrt-1052 with external QFlash&lt;BR /&gt;Segger JLink Plus V7.88g&lt;/P&gt;&lt;P&gt;The IDE debugger is working properly via Telnet connection to GDB server on localhost.&lt;BR /&gt;When the application is located at entry point, at the beginning of QFlash 0x60000000, everything works correctly.&lt;/P&gt;&lt;P&gt;The next step we need is to move the application further ahead, because at entry point we need to put a bootloader. Therefore, we configure the application to be located for example at 0x60100000.&lt;BR /&gt;In standalone normal operation, the bootloader will start from the entry point and then jump to the application.&lt;BR /&gt;During debugging, however, the debugger should program, start, and debug the application directly at its address.&lt;BR /&gt;In McuXpresso, I have set the following configurations:&lt;BR /&gt;Project properties -&amp;gt; C/C++ Build -&amp;gt; MCU Settings -&amp;gt; Memory Details -&amp;gt; Flash [Location]&lt;BR /&gt;Project properties -&amp;gt; Run/Debug Settings -&amp;gt; Edit -&amp;gt; GUI Flash tool -&amp;gt; Base Address&lt;/P&gt;&lt;P&gt;Inspection of .map file confirms that the application is correctly linked at address 0x60100000.&lt;BR /&gt;The application is programmed at the correct address (verified with J-Flash application).&lt;/P&gt;&lt;P&gt;But the debugger is not working, it fails to start the application or debug it.&lt;BR /&gt;I haven't found anything else to configure; any ideas to suggest?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Jun 2023 15:57:38 GMT</pubDate>
    <dc:creator>fractalgarden</dc:creator>
    <dc:date>2023-06-15T15:57:38Z</dc:date>
    <item>
      <title>Debugging a relocated target application</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1670460#M9044</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;MCUXpresso 11.6.0 [Build 8187] [2022-07-13]&lt;BR /&gt;mimxrt-1052 with external QFlash&lt;BR /&gt;Segger JLink Plus V7.88g&lt;/P&gt;&lt;P&gt;The IDE debugger is working properly via Telnet connection to GDB server on localhost.&lt;BR /&gt;When the application is located at entry point, at the beginning of QFlash 0x60000000, everything works correctly.&lt;/P&gt;&lt;P&gt;The next step we need is to move the application further ahead, because at entry point we need to put a bootloader. Therefore, we configure the application to be located for example at 0x60100000.&lt;BR /&gt;In standalone normal operation, the bootloader will start from the entry point and then jump to the application.&lt;BR /&gt;During debugging, however, the debugger should program, start, and debug the application directly at its address.&lt;BR /&gt;In McuXpresso, I have set the following configurations:&lt;BR /&gt;Project properties -&amp;gt; C/C++ Build -&amp;gt; MCU Settings -&amp;gt; Memory Details -&amp;gt; Flash [Location]&lt;BR /&gt;Project properties -&amp;gt; Run/Debug Settings -&amp;gt; Edit -&amp;gt; GUI Flash tool -&amp;gt; Base Address&lt;/P&gt;&lt;P&gt;Inspection of .map file confirms that the application is correctly linked at address 0x60100000.&lt;BR /&gt;The application is programmed at the correct address (verified with J-Flash application).&lt;/P&gt;&lt;P&gt;But the debugger is not working, it fails to start the application or debug it.&lt;BR /&gt;I haven't found anything else to configure; any ideas to suggest?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 15:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1670460#M9044</guid>
      <dc:creator>fractalgarden</dc:creator>
      <dc:date>2023-06-15T15:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a relocated target application</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1670476#M9045</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/61628"&gt;@fractalgarden&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;you might have a read at &lt;A href="https://community.nxp.com/t5/MCUXpresso-General/How-to-debug-relocated-code/td-p/1201422" target="_blank"&gt;https://community.nxp.com/t5/MCUXpresso-General/How-to-debug-relocated-code/td-p/1201422&lt;/A&gt; and the articles it points to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Jun 2023 16:10:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1670476#M9045</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2023-06-15T16:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a relocated target application</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1671290#M9048</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/17173"&gt;@ErichStyger&lt;/a&gt; , I looked at those articles.&lt;BR /&gt;The problem was not in the symbols loading, though. This is automatically managed by MCUXpresso in the debug script.&lt;/P&gt;&lt;P&gt;I solved the problem now, here is a breakdown hoping it's useful for similar cases in MCUXpresso with JLink.&lt;/P&gt;&lt;P&gt;When starting a relocated application from the debugger,&lt;BR /&gt;it is necessary to consider if a booting mechanism is present at entry point to jump at the relocated address.&lt;BR /&gt;If not, maybe because you are in early debug stage and rely only on the debugger to start the application,&lt;BR /&gt;then the debugger script must be configured to set the initial PC (program counter).&lt;BR /&gt;In the debug configuration, section Start, "Set program counter at (hex)"&lt;BR /&gt;set the address of the reset isr function as found in the .map file. Look for names like ResetISR.&lt;/P&gt;&lt;P&gt;If no booting mechanism is present, you must also ensure that no other reset commands are issued by the debugger script after the PC is set.&lt;BR /&gt;Check the JLinkServer console output (select from the "Display selected console" pulldown in the Console view).&lt;BR /&gt;Check everything that follows the step "Writing register (PC = 0x12345678)" - (where 0x12345678 is your ResetISR address).&lt;BR /&gt;To avoid resets after PC setting, remove the following options from the debugger configuration:&lt;BR /&gt;"Reset before running" in section JLink Debugger,&lt;BR /&gt;"Halt" in section Startup,&lt;BR /&gt;"monitor reset" in the custom commands textbox in section Startup&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2023 18:42:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-a-relocated-target-application/m-p/1671290#M9048</guid>
      <dc:creator>fractalgarden</dc:creator>
      <dc:date>2023-06-16T18:42:16Z</dc:date>
    </item>
  </channel>
</rss>

