<?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: Adding HardFault handlers in KDS3/KSDK1.2? in Kinetis Design Studio</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417347#M3238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Erich.&amp;nbsp; That does help for sure.&amp;nbsp; But now I just have to figure out how the fault handlers work.&amp;nbsp; It does look like all of them point to the same handler (_int_kernel_isr), so now I'm just wading through code to see how I'm supposed to trap the error.&amp;nbsp; I'll try making my own functions and see if any of them get called -- at the moment, it appears that there isn't a fault that's causing my code to stop executing.&amp;nbsp; I'll post my findings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT - I was expecting the fault handlers to call _int_default_isr...&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/32012i43433EDB6B3B65D8/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;I guess this implies that I need to read up on these macros -- elsewhere in the code it looks like _int_default_isr is intended for unhandled exceptions.&amp;nbsp; So I put a breakpoint there and it does hit it.&amp;nbsp; So this means my application did stop due to an unhandled exception, so now I just have to figure out which one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT - &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;​ looking at startup_MK64F12.S, I see the list of vector numbers.&amp;nbsp; Being mostly assembly-illiterate, I took this info:&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/32156i297AAC6751C6A92E/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;and working backwards up the list, it looks like NMI_Handler would then be 0.&amp;nbsp; When I hit the breakpoint in _int_default_isr, it looked like the unhandled exception had a vector number of 3, which is BusFault_Handler.&amp;nbsp; Reading &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dereksnell"&gt;dereksnell&lt;/A&gt;​'s post &lt;A href="https://community.nxp.com/thread/306244"&gt;Tracking down Hard Faults&lt;/A&gt; , it sounds like it's likely an invalid memory address that's causing my problem, which sounds right since merely calling netconn_accept() (modified to simply return 0) causes the crash to occur.&amp;nbsp; He said it could also be accessing a peripheral register before the clock is enabled, but I don't think this is the case since I can ping the device up until the point where I call netconn_accept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you recommend any other debugging strategies?&amp;nbsp; In the meantime, I will try to decipher your post &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;&amp;nbsp; to see if I can determine what causes the memory corruption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 19:08:32 GMT</pubDate>
    <dc:creator>dave408</dc:creator>
    <dc:date>2015-06-01T19:08:32Z</dc:date>
    <item>
      <title>Adding HardFault handlers in KDS3/KSDK1.2?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417345#M3236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have read &lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-objectid="11093" data-objecttype="3" href="https://community.nxp.com/people/BlackNight"&gt;Erich Styger&lt;/A&gt;'s blog &lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fmcuoneclipse.com%2F2012%2F11%2F24%2Fdebugging-hard-faults-on-arm-cortex-m%2F" rel="nofollow" target="_blank"&gt;Debugging Hard Faults on ARM Cortex-M | MCU on Eclipse&lt;/A&gt; regarding the creation of a separate fault handler for each fault type.&amp;nbsp; Admittedly, I never actually used them in my previous project under KDS2/KSDK1.1, but I did see the option to select "own handler" in the Build Options for the CPU settings in PEx.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to debug a problem with my application, and want to be able to see what sort of fault it's encountering, but I cannot find this PEx setting in KDS3/KSDK1.2.&amp;nbsp; This is what I see:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="33624_33624.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/120369iE39DBC813F113468/image-size/large?v=v2&amp;amp;px=999" role="button" title="33624_33624.png" alt="33624_33624.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/31802iFAEFAF7516CB2CDF/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone know what we are supposed to do in the new IDE?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 18:26:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417345#M3236</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-06-01T18:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding HardFault handlers in KDS3/KSDK1.2?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417346#M3237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dave,&lt;/P&gt;&lt;P&gt;The Kinetis SDK changed the API, so that functionality and feature of Processor Expert is not any more available if you use the Kinetis SDK.&lt;/P&gt;&lt;P&gt;In some sense, it is not applicable any more for the SDK.&lt;/P&gt;&lt;P&gt;The Kintetis SDK uses its own vector table. You find that vector table with the vector names in the startup code (for MK64F e.g. this is SDK\platform\devices\MK64F12\startup\gcc\startup_MK64F12.S).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 18:33:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417346#M3237</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-06-01T18:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding HardFault handlers in KDS3/KSDK1.2?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417347#M3238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Erich.&amp;nbsp; That does help for sure.&amp;nbsp; But now I just have to figure out how the fault handlers work.&amp;nbsp; It does look like all of them point to the same handler (_int_kernel_isr), so now I'm just wading through code to see how I'm supposed to trap the error.&amp;nbsp; I'll try making my own functions and see if any of them get called -- at the moment, it appears that there isn't a fault that's causing my code to stop executing.&amp;nbsp; I'll post my findings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT - I was expecting the fault handlers to call _int_default_isr...&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/32012i43433EDB6B3B65D8/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;I guess this implies that I need to read up on these macros -- elsewhere in the code it looks like _int_default_isr is intended for unhandled exceptions.&amp;nbsp; So I put a breakpoint there and it does hit it.&amp;nbsp; So this means my application did stop due to an unhandled exception, so now I just have to figure out which one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT - &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight"&gt;BlackNight&lt;/A&gt;​ looking at startup_MK64F12.S, I see the list of vector numbers.&amp;nbsp; Being mostly assembly-illiterate, I took this info:&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/32156i297AAC6751C6A92E/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;and working backwards up the list, it looks like NMI_Handler would then be 0.&amp;nbsp; When I hit the breakpoint in _int_default_isr, it looked like the unhandled exception had a vector number of 3, which is BusFault_Handler.&amp;nbsp; Reading &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/dereksnell"&gt;dereksnell&lt;/A&gt;​'s post &lt;A href="https://community.nxp.com/thread/306244"&gt;Tracking down Hard Faults&lt;/A&gt; , it sounds like it's likely an invalid memory address that's causing my problem, which sounds right since merely calling netconn_accept() (modified to simply return 0) causes the crash to occur.&amp;nbsp; He said it could also be accessing a peripheral register before the clock is enabled, but I don't think this is the case since I can ping the device up until the point where I call netconn_accept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you recommend any other debugging strategies?&amp;nbsp; In the meantime, I will try to decipher your post &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;&amp;nbsp; to see if I can determine what causes the memory corruption.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 19:08:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417347#M3238</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-06-01T19:08:32Z</dc:date>
    </item>
    <item>
      <title>Re: Adding HardFault handlers in KDS3/KSDK1.2?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417348#M3239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/BlackNight" rel="nofollow noopener noreferrer" target="_blank"&gt;BlackNight&lt;/A&gt;​ ok, I'm trying my best here.&amp;nbsp; I took your base assembly code and slightly modified it because r1 was 0, and I couldn't tell if the offending call was made from the main stack or process stack.&amp;nbsp; I saw that r6 wasn't used in this context, so I just set it to 1 or 2, depending on the branch condition:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14331903860916737 jive_macro_code jive_text_macro" data-renderedposition="71_8_1233_240" jivemacro_uid="_14331903860916737" modifiedtitle="true"&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm volatile (&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " movs r0,#4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " movs r1, lr&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " tst r0, r1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " beq _MSP&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "movs r6,#1\n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " mrs r0, psp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " b _HALT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "_MSP:&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;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "movs r6,#2\n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " mrs r0, msp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "_HALT:&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; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " ldr r1,[r0,#20]&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " bkpt #0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; \n"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; );&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since r6 was 2 after I stepped over this function, the problem must be on the main stack, which I assume is the non-RTOS task stack.&amp;nbsp; If r1 is 0, does this mean that somehow main is trying to call a method on a null pointer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 20:25:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417348#M3239</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-06-01T20:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding HardFault handlers in KDS3/KSDK1.2?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417349#M3240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was wrong about it being a BusFault, so my evaluation must have been incorrect.&amp;nbsp; I found that the fault handlers are all weak linked, so I just defined my own functions for HardFault_Handler, MemManage_Handler, BusFault_Handler, and UsageFault_Handler.&amp;nbsp; When I set breakpoints in all three, HardFault_Handler was the one that got called.&amp;nbsp; Can you help me to understand where I went wrong during my diagnosis?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 20:55:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417349#M3240</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2015-06-01T20:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Adding HardFault handlers in KDS3/KSDK1.2?</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417350#M3241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way to handle specific fault handlers in KDS 3.0 is to simply define your own fault handler functions.&amp;nbsp; They are weak-linked.&amp;nbsp; You can create fault_handlers.c and paste in this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14334270642343683" data-renderedposition="52.399993896484375_8_1233_347" jivemacro_uid="_14334270642343683" modifiedtitle="true"&gt;&lt;OL class="dp-cpp" start="1"&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;void HardFault_Handler(unsigned &lt;SPAN class="datatypes"&gt;long&lt;/SPAN&gt; *hardfault_args)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;{&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;}&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;void MemManage_Handler(unsigned &lt;SPAN class="datatypes"&gt;long&lt;/SPAN&gt; *hardfault_args)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;{&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;}&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;void BusFault_Handler(unsigned &lt;SPAN class="datatypes"&gt;long&lt;/SPAN&gt; *hardfault_args)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;{&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;}&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&lt;SPAN class="keyword"&gt;void UsageFault_Handler(unsigned &lt;SPAN class="datatypes"&gt;long&lt;/SPAN&gt; *hardfault_args)&amp;nbsp; &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;{&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;&amp;nbsp; &lt;/LI&gt;&lt;LI&gt;}&amp;nbsp; &lt;/LI&gt;&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested this with one of my applications that is currently crashing somehow, and when I add the handlers, I do end up in HardFault_Handler, and now just need to figure out how to debug it.&amp;nbsp; &lt;IMG alt="Smiley Happy" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="https://community.nxp.com/i/smilies/16x16_smiley-happy.png" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:18:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Adding-HardFault-handlers-in-KDS3-KSDK1-2/m-p/417350#M3241</guid>
      <dc:creator>dave408</dc:creator>
      <dc:date>2020-11-02T13:18:38Z</dc:date>
    </item>
  </channel>
</rss>

