<?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: Debugging stops unexpectedly in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/1263807#M6887</link>
    <description>&lt;P&gt;That has something to do with your clocks probably. Its not enabled or not engaged during register access.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance for FLEXIO in MIMXRT: CLOCK_EnableClock(s_flexioClocks[FLEXIO_SPI_GetInstance(base)]);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Apr 2021 22:50:08 GMT</pubDate>
    <dc:creator>Daniil</dc:creator>
    <dc:date>2021-04-16T22:50:08Z</dc:date>
    <item>
      <title>Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760229#M2105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Debugging the project has always worked without any problems with LPCexpresso.&lt;/DIV&gt;&lt;DIV&gt;After some time I had to debug the project again, and used the new LPCexpresso version.&lt;BR /&gt;But now the debugger stops after a certain line of code.&lt;BR /&gt;Upgraded LPCexpresso to MCUXpresso IDE v10.0.2 (created new project).&lt;BR /&gt;Debugger still stops after the same line of code.&lt;BR /&gt;Using Red Probe + debugger, also used LPC-Link 1 and LPC-Link 2.&lt;/DIV&gt;&lt;DIV&gt;Using Microcontroller LPC1822&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;STRONG&gt;Line of code, after which the debugger stops:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;#define&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __IO&amp;nbsp;&amp;nbsp;&amp;nbsp; volatile&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*!&amp;lt; defines 'read / write' permissions&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#define TFT_ADR_DAT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;0x1D000040&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;#define _TFTwrDat( dat )&amp;nbsp;do { *(__IO u16 *) (TFT_ADR_DAT)= dat; } while(0)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;_TFTwrDat(0);&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;STRONG&gt;The following error is given when a step over is done at the above line code:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;Target reported errors&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Reason:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Read Memory&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Details:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Read Memory&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Read Memory&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Debug port inaccessible after access at location 0x00000000&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Remove break/watch&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Wire ACK Fault in DAP access&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;When te project is just "run", so no stepping, then the board does not work as expected.&lt;BR /&gt;&lt;STRONG&gt;When stopping debugging it gives the following error:&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;Failed to execute MI command:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;-interpreter-exec console kill&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Error message from debugger back end:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Can't kill process&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Error reported by target&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Target reported errors&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Reason:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;19: Could not stop execution from running&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;19: Could not stop execution from running&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Cannot halt processor.&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;When optimization level is set to "Optimize (-O1)" the board works correctly and debugging can be paused, stepped over, etc. &lt;BR /&gt;But because of optimization not all lines can be debugged correctly.&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Any suggestions to solve this problem?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Nov 2017 13:04:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760229#M2105</guid>
      <dc:creator>harrievandeberg</dc:creator>
      <dc:date>2017-11-08T13:04:54Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760230#M2106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the memory at&amp;nbsp;0x1D000040 actually enabled correctly? Does it support a halfword access?&lt;/P&gt;&lt;P&gt;Where is the code you are executing running from?&lt;/P&gt;&lt;P&gt;Can you successfully view the memory using the Memory view?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Nov 2017 14:40:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760230#M2106</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2017-11-09T14:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760231#M2107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;The address 0x1D000040 is an address of the external memory interface.&lt;BR /&gt;A display is attached to this external memory interface. &lt;BR /&gt;Commands and data are written to 2 fixed addresses.&lt;BR /&gt;The address 0x1D000040 is used for writing data to.&lt;/DIV&gt;&lt;DIV&gt;The code executes from the internal flash bank A.&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;When the compiler's optimization level is set to "optimize (-O1)", and program stops on startup at main, it can read address 0x1D000040, it shows FFFFFFFF.&lt;/DIV&gt;&lt;DIV&gt;But when the compiler's optimization level is set to "None (-O0)", and program stops on startup at main, it cannot read address 0x1D000040, it shows ????????,&lt;BR /&gt;and immediately a popup error appears with the text:&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Target reported errors&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Reason:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Read Memory&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Read Memory&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Debug port inaccessible after access at location 0x1D000040&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Debug port inaccessible after access at location 0x1D00027C&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;When I then click OK, and try to start (play button) to run the project the following error appears:&lt;BR /&gt;&lt;EM&gt;Target reported errors&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;Reason:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;10: Could not start execution from stop&amp;nbsp;&amp;nbsp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;10: Could not start execution from stop&amp;nbsp; &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Wire ACK Fault in DAP access&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;15: Target error from Read Memory&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Debug port inaccessible after access at location 0x1D000040&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Debug port inaccessible after access at location 0x1D00027C&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Any ideas?&lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2017 14:37:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760231#M2107</guid>
      <dc:creator>harrievandeberg</dc:creator>
      <dc:date>2017-11-15T14:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760232#M2108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I would guess that there is some difference in the actions taking place in your application's startup code before you reach the default breakpoint on main().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try changing the &amp;nbsp;default breakpoint so that you instead stop in the startup code (probably at the symbol ResetISR in the startup file). Then try stepping through both the Debug and Release builds and try to spot a difference in what your code is doing. It is possible, for instance, that you have some conditional code somewhere (based on the DEBUG / NDEBUG symbols).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Section 10.3.2, "Controlling the initial breakpoint (on main)" in the MCUXpresso IDE v10.1.0 User Guide covers how to change the default breakpoint.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2017 10:54:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760232#M2108</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2017-11-17T10:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760233#M2109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have set a breakpoint at the first line of code of the function ResetISR.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still the same happens as described in my previous message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if no code has run, the fault will probably not be in the software code.&lt;/P&gt;&lt;P&gt;Also we have never had these issues before with older versions of LPCxpresso.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Only with new versions of LPCxpresso and MCUXpresso we have this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can the optimize setting also influence the way debugging is performed?&lt;/P&gt;&lt;P&gt;Can it be a debug setting?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2017 11:53:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760233#M2109</guid>
      <dc:creator>harrievandeberg</dc:creator>
      <dc:date>2017-11-17T11:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760234#M2110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nothing in the debug tools will be setting up your external RAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you stop at ResetISR() and don't then step through your code (until you reach main), then you haven't actually determined what your startup code may or may not be doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But fundamentally something in your code needs to be setting up the external memory controller and RAM. You need to determine what that code is, and whether it is being run for both a Debug and a Release build.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MCUXpresso IDE Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2017 13:14:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760234#M2110</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2017-11-17T13:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760235#M2111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Debugging (when using the memory viewer) already stops before executing the startup code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So the startup code should not be relevant.&lt;/P&gt;&lt;P&gt;Also the startup code does not differ depending on debug symbols because I use one build configuration. In that build configuration I only change the "Optimize" setting. So nothing changes to the defined symbols, or other settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I search which lines of code must be optimized, so that a debug crash is prevented.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Now I can set for the complete project optimize off, only for one line code I have added pragma's, as below:&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;#pragma GCC push_options&lt;BR /&gt;#pragma GCC optimize ("O3")&lt;/DIV&gt;&lt;DIV&gt;u16 varVnr2sn( u16 vnr )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;return CvarShortname[ vnr ] &amp;amp; _word(0x7f,0x7f);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;#pragma GCC pop_options&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;With the above added pragma's the debugger does not crash anymore. For me it works, but I still found it very strange. If you have any ideas, I would like to know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Guus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Dec 2017 11:17:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/760235#M2111</guid>
      <dc:creator>harrievandeberg</dc:creator>
      <dc:date>2017-12-22T11:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging stops unexpectedly</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/1263807#M6887</link>
      <description>&lt;P&gt;That has something to do with your clocks probably. Its not enabled or not engaged during register access.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance for FLEXIO in MIMXRT: CLOCK_EnableClock(s_flexioClocks[FLEXIO_SPI_GetInstance(base)]);&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Apr 2021 22:50:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Debugging-stops-unexpectedly/m-p/1263807#M6887</guid>
      <dc:creator>Daniil</dc:creator>
      <dc:date>2021-04-16T22:50:08Z</dc:date>
    </item>
  </channel>
</rss>

