<?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: How to Change Interrupt Stack Size in MCUXpressoIDE? in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-Change-Interrupt-Stack-Size-in-MCUXpressoIDE/m-p/1028988#M5432</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;em..........&lt;/P&gt;&lt;P&gt;I solved this problem on my own.&lt;/P&gt;&lt;P&gt;This problem is due to that total default ram size is only 512B (MKL36Z64VLH4 has 8KB memory). I didn`t expected that the default stack size configuration is such small. I set it to 4K and nothing goes overflowed now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I solved this problem:&lt;/P&gt;&lt;P&gt;Projects -&amp;gt; Properties -&amp;gt; MCU C++ Linker -&amp;gt; Managed Linker Script&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_10-11-28.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98973i030960E42435C8EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_10-11-28.png" alt="Snipaste_2020-02-14_10-11-28.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_10-05-34.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98904iAC9053C4E6E86936/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_10-05-34.png" alt="Snipaste_2020-02-14_10-05-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(default setting is only 512B)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_10-06-02.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98906iD02E7B3A9B307CA1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_10-06-02.png" alt="Snipaste_2020-02-14_10-06-02.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(making it bigger may solve the problem)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Feb 2020 02:08:22 GMT</pubDate>
    <dc:creator>yhgu2000</dc:creator>
    <dc:date>2020-02-14T02:08:22Z</dc:date>
    <item>
      <title>How to Change Interrupt Stack Size in MCUXpressoIDE?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-Change-Interrupt-Stack-Size-in-MCUXpressoIDE/m-p/1028987#M5431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using MKL36Z64VLH4, with NXP SDK v2.0.4 and MCUXpressoIDE.&lt;/P&gt;&lt;P&gt;I write a simple PIT example. It has an blank main() which only have a infinite while loop in it. The PIT module interrupt CPU every 1 second and it blink the led in its IRQ handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the Heap and Stack Usage when in main():&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_09-29-51.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98890i439D761867527040/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_09-29-51.png" alt="Snipaste_2020-02-14_09-29-51.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when the interruption happens and program enter the IRQ handler:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_09-30-35.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98972iCED7D15DB627E3F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_09-30-35.png" alt="Snipaste_2020-02-14_09-30-35.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is strange. I assume that this is because CPU does not reserver enough stack space when it enters the handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I started to do some complex things in IRQ handler, the stack just overflowed! How to increase interrupt stack size?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess i am not the first guy who have this problem. In deed, I found an old solution :&lt;A _jive_internal="true" class="link-titled" href="https://community.nxp.com/thread/440700#comment-860538" title="https://community.nxp.com/thread/440700#comment-860538"&gt;https://community.nxp.com/thread/440700#comment-860538&lt;/A&gt;. But It is not for MCUXpresso and doesn`t work with me either. I didn`t find anything about "__DEFAULT_INTERRUPT_STACK_SIZE" in the link file generated by MCUXpresso.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What should I do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;Yuhao Gu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 01:49:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-Change-Interrupt-Stack-Size-in-MCUXpressoIDE/m-p/1028987#M5431</guid>
      <dc:creator>yhgu2000</dc:creator>
      <dc:date>2020-02-14T01:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to Change Interrupt Stack Size in MCUXpressoIDE?</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-Change-Interrupt-Stack-Size-in-MCUXpressoIDE/m-p/1028988#M5432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;em..........&lt;/P&gt;&lt;P&gt;I solved this problem on my own.&lt;/P&gt;&lt;P&gt;This problem is due to that total default ram size is only 512B (MKL36Z64VLH4 has 8KB memory). I didn`t expected that the default stack size configuration is such small. I set it to 4K and nothing goes overflowed now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is how I solved this problem:&lt;/P&gt;&lt;P&gt;Projects -&amp;gt; Properties -&amp;gt; MCU C++ Linker -&amp;gt; Managed Linker Script&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_10-11-28.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98973i030960E42435C8EA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_10-11-28.png" alt="Snipaste_2020-02-14_10-11-28.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_10-05-34.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98904iAC9053C4E6E86936/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_10-05-34.png" alt="Snipaste_2020-02-14_10-05-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(default setting is only 512B)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Snipaste_2020-02-14_10-06-02.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/98906iD02E7B3A9B307CA1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Snipaste_2020-02-14_10-06-02.png" alt="Snipaste_2020-02-14_10-06-02.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(making it bigger may solve the problem)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Feb 2020 02:08:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/How-to-Change-Interrupt-Stack-Size-in-MCUXpressoIDE/m-p/1028988#M5432</guid>
      <dc:creator>yhgu2000</dc:creator>
      <dc:date>2020-02-14T02:08:22Z</dc:date>
    </item>
  </channel>
</rss>

