<?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>LPCXpresso IDE中的主题 Re: Monitoring Stack Size</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539617#M6573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a number of ways this might be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One idea is to capture the stack pointer from an interrupt routine such as systick. LPCXpresso IDE creates projects using a single stack model for exceptions - but take care that you monitor the intended stack.&amp;nbsp; Code like the example below could be used the capture the stack:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;__STATIC_INLINE uint32_t __get_MSP(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;&amp;nbsp; register uint32_t __regMainStackPointer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __ASM("msp");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;&amp;nbsp; return(__regMainStackPointer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the data has been captured, it could be saved into a global variable, then within LPCXpresso IDE this global variable could be monitored using SWO Datatrace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389084"&gt;Overview of Trace support in LPCXpresso IDE&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LPCXpresso-support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2016 08:37:09 GMT</pubDate>
    <dc:creator>lpcxpresso_supp</dc:creator>
    <dc:date>2016-06-17T08:37:09Z</dc:date>
    <item>
      <title>Monitoring Stack Size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539616#M6572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am developing an application for the LPC4088 using the LPC-Link2 probe and I am looking for ways to monitor the size of the stack ideally in real time. Any suggestions? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 10:35:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539616#M6572</guid>
      <dc:creator>historysmistory</dc:creator>
      <dc:date>2016-06-16T10:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Stack Size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539617#M6573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a number of ways this might be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One idea is to capture the stack pointer from an interrupt routine such as systick. LPCXpresso IDE creates projects using a single stack model for exceptions - but take care that you monitor the intended stack.&amp;nbsp; Code like the example below could be used the capture the stack:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;__STATIC_INLINE uint32_t __get_MSP(void)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;&amp;nbsp; register uint32_t __regMainStackPointer&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; __ASM("msp");&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;&amp;nbsp; return(__regMainStackPointer);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier; font-size: 12pt;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once the data has been captured, it could be saved into a global variable, then within LPCXpresso IDE this global variable could be monitored using SWO Datatrace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389084"&gt;Overview of Trace support in LPCXpresso IDE&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LPCXpresso-support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 08:37:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539617#M6573</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2016-06-17T08:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring Stack Size</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539618#M6574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:13:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Monitoring-Stack-Size/m-p/539618#M6574</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:13:22Z</dc:date>
    </item>
  </channel>
</rss>

