<?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: LPCXpresso debugging with Stack Frame changes in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642466#M32650</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While the switch code is assembler (see below), the code to be debugged is either C or C++. Are you suggesting I can add some additional directives in this code that will take the debugger with it to the new stack?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Ron&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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM:   JenOSHandler.s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION:  Assembler code to handle the single stack for PendSV/SVC events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHOR:    Ron Kreymborg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REVISION:&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;&lt;/P&gt;&lt;P&gt;   .syntax      unified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .thumb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .section   .text.JenOSHandlers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .global    PendSV_Handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .type      PendSV_Handler, %function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .global    SVC_Handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .type      SVC_Handler, %function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .type      pendSV_ret, %function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .extern    ExecutePendSV, %function&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Apr 2017 00:55:29 GMT</pubDate>
    <dc:creator>ronkreymborg</dc:creator>
    <dc:date>2017-04-05T00:55:29Z</dc:date>
    <item>
      <title>LPCXpresso debugging with Stack Frame changes</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642464#M32648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin: 0cm 0cm 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;For several years I have been using the well known PenSV/SVC interrupt trick to provide a new stack frame for tasks that are scheduled with a higher priority than the task currently running. The higher priority task with its new stack frame pre-empts the lower priority task, runs to completion, and when it exits the SVC interrupt return manages the stack unpacking and the previous task continues as though nothing had happened. This works well but LPCXpresso has a problem with debugging in processors like the ‘1347 in that when trying to debug a running high priority task, the SWD debugger using the Windows LinkServer apparently cannot handle the stack change and cannot provide any debugging assistance. The breakpoints work and the program stops, but that’s it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;My question is: Are there specific addresses, pointers, etc involved with maintaining the SWD debugger’s grip on what is happening? What I am hoping is in that case I can add the necessary code to include carrying these parameters over into the new stack frame as part of the PendSV/SVC handler.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0cm 0cm 10pt;"&gt;&lt;SPAN style="color: #000000; font-family: Calibri; font-size: medium;"&gt;Regards, Ron&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Apr 2017 04:46:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642464#M32648</guid>
      <dc:creator>ronkreymborg</dc:creator>
      <dc:date>2017-04-03T04:46:59Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso debugging with Stack Frame changes</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642465#M32649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not 100% sure I follow the exact problem you are reporting - maybe you could post a couple of screenshots illustrating your problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My best guess though would be, assuming the use of assembler code here, is that you have not decorated your sources with the appropriate directives to place the debug symbols in the image that gdb needs (or potentially not built your assembler sources with debug enabled).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LPCXpresso Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 07:15:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642465#M32649</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2017-04-04T07:15:30Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso debugging with Stack Frame changes</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642466#M32650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While the switch code is assembler (see below), the code to be debugged is either C or C++. Are you suggesting I can add some additional directives in this code that will take the debugger with it to the new stack?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Ron&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;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PROGRAM:   JenOSHandler.s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FUNCTION:  Assembler code to handle the single stack for PendSV/SVC events.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUTHOR:    Ron Kreymborg&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REVISION:&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;&lt;/P&gt;&lt;P&gt;   .syntax      unified&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .thumb&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .section   .text.JenOSHandlers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .global    PendSV_Handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .type      PendSV_Handler, %function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .global    SVC_Handler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .type      SVC_Handler, %function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .type      pendSV_ret, %function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   .extern    ExecutePendSV, %function&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 00:55:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642466#M32650</guid>
      <dc:creator>ronkreymborg</dc:creator>
      <dc:date>2017-04-05T00:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso debugging with Stack Frame changes</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642467#M32651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Might be worth seeing if wrapping each function in &lt;STRONG&gt;.func&lt;/STRONG&gt; / &lt;STRONG&gt;.endfunc&lt;/STRONG&gt; helps. You would be advised to&amp;nbsp;use &lt;STRONG&gt;.thumb_func&lt;/STRONG&gt; AS WELL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beyond that, without more details, a buildable/debuggable example, or at least a few screenshots, I'm afraid that I'm not sure what else to suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;LPCXpresso Support&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Apr 2017 10:12:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642467#M32651</guid>
      <dc:creator>lpcxpresso_supp</dc:creator>
      <dc:date>2017-04-05T10:12:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPCXpresso debugging with Stack Frame changes</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642468#M32652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for those suggestions. I will try and setup test case that demonstrates the situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess my original question was what has just happened when a program halts at a breakpoint? As I understand it, this was all setup in the System Debug registers and it is this hardware that halts the processor, at that point nothing to do with Xpresso. However, once the processor has halted it is up to Xpresso to manage this register set as to variable probes, restart, etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other OSs such as FreeRTOS must have this problem. How do they debug after stack changes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Ron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Apr 2017 06:05:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/LPCXpresso-debugging-with-Stack-Frame-changes/m-p/642468#M32652</guid>
      <dc:creator>ronkreymborg</dc:creator>
      <dc:date>2017-04-07T06:05:11Z</dc:date>
    </item>
  </channel>
</rss>

