<?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>MQX Software SolutionsのトピックRe: Debugging techniques with MQX and KDS?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428662#M14319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm also open to suggestions about how to better handle this sort of request.&amp;nbsp; It's a little open-ended, and I'm not sure if that prevents people from posting responses.&amp;nbsp; Is there a better forum mechanism for this sort of thing?&amp;nbsp; Maybe I should go back to just posting separate questions...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 May 2015 17:22:22 GMT</pubDate>
    <dc:creator>dave408</dc:creator>
    <dc:date>2015-05-13T17:22:22Z</dc:date>
    <item>
      <title>Debugging techniques with MQX and KDS?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428659#M14316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm new to MQX and am running into problems here and there, and I'm sure there will be more!&amp;nbsp; I was hoping that members of the community can share some of their special debugging techniques with MQX.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am aware of the &lt;STRONG&gt;Task Aware Debugging (TAD)&lt;/STRONG&gt; feature and have added it to KDS 2.0 (I haven't migrated to KDS 3.0 yet).&amp;nbsp; But other than this, what else is there?&amp;nbsp; I have read about enabling the &lt;STRONG&gt;Kernel Logging&lt;/STRONG&gt; feature, but have only seen that with the older MQX component.&amp;nbsp; Since PEx now has MQX as an OSA selection, I no longer see Kernel Logging in the parameter list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd also like to see my stack usage over time, but whenever I go to MQX -&amp;gt; Stack usage, it just says "Stack usage information not found!".&amp;nbsp; I've had cases where my application locks up, and when I increase my stack space, my problem goes away.&amp;nbsp; I can only assume that this is okay, since I don't use dynamic memory allocation and don't have to worry about memory leaks.&amp;nbsp; I got lucky this time, because the way the error manifested itself was with a troubling message when I paused execution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/26937i19653C29204CF7B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;How do I enable Stack Usage information?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore, what about the case where an application locks up, and it's not a stack space issue?&amp;nbsp; How do you go about figuring out what happened?&amp;nbsp; I left my application running overnight, and when I came back to it this morning, it was frozen.&amp;nbsp; The green D2 LED on my FRDM-K64F was blinking steadily, but this doesn't tell me much because that LED is controlled by the K20 onboard.&amp;nbsp; I couldn't pause execution, because the debugger had completely lost connection to the board somehow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what about catching &lt;STRONG&gt;Hard Fault errors&lt;/STRONG&gt;?&amp;nbsp; I tried to follow &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;​'s informative post on mcuoneclipse, but I have enabled Unhandled vectors -&amp;gt; "Own handler for every", and now I can't figure out where those handlers reside.&amp;nbsp; :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm looking forward to hearing what everyone else does, as well as hopefully getting feedback on how to enable the debugging features that I have mentioned above.&amp;nbsp; Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 13:37:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428659#M14316</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-13T13:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging techniques with MQX and KDS?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428660#M14317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;About debugging hard faults: You need to install a handler for it:&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/11/24/debugging-hard-faults-on-arm-cortex-m/" title="http://mcuoneclipse.com/2012/11/24/debugging-hard-faults-on-arm-cortex-m/"&gt;Debugging Hard Faults on ARM Cortex-M | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/12/28/a-processor-expert-component-to-help-with-hard-faults/" title="http://mcuoneclipse.com/2012/12/28/a-processor-expert-component-to-help-with-hard-faults/"&gt;A Processor Expert Component to Help with Hard Faults | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 15:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428660#M14317</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-05-13T15:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging techniques with MQX and KDS?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428661#M14318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich, I did read both of those posts already.&amp;nbsp; I enabled "Own handler for every" as described, but as I stated in my original post, I cannot find where those handlers end up, so I can't confirm that they exist.&amp;nbsp; :smileyhappy:&amp;nbsp; Your post refers to Vectors.c, but I don't have that in the Generated Code section.&amp;nbsp; I have looked for Fault, Hard_Fault, vect_table, etc etc and don't see that lookup table anywhere.&amp;nbsp; Can you point me to where it is in KDS 2.0?&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 15:28:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428661#M14318</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-13T15:28:47Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging techniques with MQX and KDS?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428662#M14319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm also open to suggestions about how to better handle this sort of request.&amp;nbsp; It's a little open-ended, and I'm not sure if that prevents people from posting responses.&amp;nbsp; Is there a better forum mechanism for this sort of thing?&amp;nbsp; Maybe I should go back to just posting separate questions...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 May 2015 17:22:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428662#M14319</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-05-13T17:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging techniques with MQX and KDS?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428663#M14320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're now up to KDS 3.0 and I had to get fault handlers working.&amp;nbsp; It turns out that they are weak linked, so all you have to do is define your own functions like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14334265884331066 jive_text_macro" data-renderedposition="50_8_1233_192" jivemacro_uid="_14334265884331066" modifiedtitle="true"&gt;&lt;P&gt;void HardFault_Handler(unsigned long *hardfault_args)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void MemManage_Handler(unsigned long *hardfault_args)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void BusFault_Handler(unsigned long *hardfault_args)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void UsageFault_Handler(unsigned long *hardfault_args)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 14:01:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428663#M14320</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-06-04T14:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging techniques with MQX and KDS?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428664#M14321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems better to ask directed questions, so I am going to end this discussion and focus on specific ones from now on.&amp;nbsp; :smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jun 2015 14:03:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Debugging-techniques-with-MQX-and-KDS/m-p/428664#M14321</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-06-04T14:03:21Z</dc:date>
    </item>
  </channel>
</rss>

