<?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: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390721#M13052</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I will have to try this out when I have more time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Mar 2015 17:49:49 GMT</pubDate>
    <dc:creator>mjohn</dc:creator>
    <dc:date>2015-03-18T17:49:49Z</dc:date>
    <item>
      <title>In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390717#M13048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In Kinetis Design Studio, I've been using MQX with multiple tasks. The Task Aware Debugger has been a very useful tool when debugging, but I am curious if it is possible to see the current program stack for all the tasks whenever I pause the debugger?&lt;/P&gt;&lt;P&gt;This is what I'm referring to below. I am only able to see one task's program stack.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="program_stack.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/51576i6D048471800DA2D2/image-size/large?v=v2&amp;amp;px=999" role="button" title="program_stack.png" alt="program_stack.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 01:27:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390717#M13048</guid>
      <dc:creator>mjohn</dc:creator>
      <dc:date>2015-03-18T01:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390718#M13049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately we are not able manage it by TAD.&lt;/P&gt;&lt;P&gt;This information (current program stack for all the tasks) could be obtained only by debugger who deeply know elf file and who know how data are stored on stack.&lt;/P&gt;&lt;P&gt;Theoretically we can read it from task stacks, however structure of information in stack is inconsistent and we do not know any fix point where we can read PC value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Information about current program stack for all the tasks is one of CodeWarrior debugger features, however it seems that open source debuggers doesn’t offer such feature. Maybe I am wrong and there is any option, but unfortunately I do not know about it. I am sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 16:29:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390718#M13049</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-03-18T16:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390719#M13050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This has come up before, e.g.: &lt;A href="https://community.nxp.com/thread/332162"&gt;How to view call stack which task is not actived in KDS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There isn't a solution. The answer appears to be that you can only see the stack for the currently active task. It seems KDS is not really ready for serious usage in this regard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 16:41:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390719#M13050</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2015-03-18T16:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390720#M13051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your note.&lt;/P&gt;&lt;P&gt;The true is that you get it for what you paid for.&lt;/P&gt;&lt;P&gt;KDS is built on open source components and therefore it is offered for free.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can anytime create/modify your implementation of GDB server and add support for this feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just discover that one of our engineers already made some modifications in OpenOCD&amp;nbsp; debugger, but this change is still not released.&lt;/P&gt;&lt;P&gt;For more details, you can look at: &lt;A href="http://openocd.zylin.com/#/c/2599/"&gt;http://openocd.zylin.com/#/c/2599/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;So, if you have time for debugging debugger, you could apply this patch to OpenOCD and try it. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 17:40:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390720#M13051</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-03-18T17:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390721#M13052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, I will have to try this out when I have more time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 17:49:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390721#M13052</guid>
      <dc:creator>mjohn</dc:creator>
      <dc:date>2015-03-18T17:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390722#M13053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Radek,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is true this is a really nice feature of CodeWarrior that is not present in the open source implementations. I came across the same issue a couple of years ago when I was doing a project with FreeRTOS on an NXP Cortex-M with the LPCXpresso toolchain, which is also based on Eclipse and OpenOCD if I remember correctly. At that time I looked in to whether it would be possible to add this feature but did not have the time to get anywhere with it. If one of your engineers has been working on OpenOCD towards this goal that would be great. I will take a look.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Matthew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 18:19:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390722#M13053</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2015-03-18T18:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390723#M13054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Radek, do you know if there is a way to get the program counter of a currently inactive task when debugging? Or if there is perhaps an API function call that could return this information? If I was able to simply retrieve the program counter of another task, I could find what part of code it has stopped at easily. It would help out a lot when debugging.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 19:35:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390723#M13054</guid>
      <dc:creator>mjohn</dc:creator>
      <dc:date>2015-03-18T19:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390724#M13055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Attached is an example I did using MQX back in 2011 to find PC of a task descriptor.&amp;nbsp; I started with the mqx/examples/lwevent project.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 20:02:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390724#M13055</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-03-18T20:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390725#M13056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have previously modified MQX/mqx/source/tad/tad.c so that the shell "tad stack" command includes the PC in its output. This might help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14267102052687210" jivemacro_uid="_14267102052687210" modifiedtitle="true"&gt;
&lt;P&gt;-- 336/tad.c Wed Mar 18 13:16:29 2015&lt;/P&gt;
&lt;P&gt;+++ 337/tad.c Wed Mar 18 13:16:16 2015&lt;/P&gt;
&lt;P&gt;@@ -323,7 +323,7 @@&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; char_ptr&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;&amp;nbsp;&amp;nbsp; task_name;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf ("\nStack Usage:\n");&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;&amp;nbsp; printf ("Task&amp;nbsp;&amp;nbsp; Stack Base&amp;nbsp;&amp;nbsp; Stack Limit&amp;nbsp;&amp;nbsp; Stack Used&amp;nbsp;&amp;nbsp; %% Used&amp;nbsp;&amp;nbsp; Overflow?\n");&lt;/P&gt;
&lt;P&gt;+&amp;nbsp;&amp;nbsp; printf ("Task&amp;nbsp;&amp;nbsp; PC&amp;nbsp;&amp;nbsp; Stack Base&amp;nbsp;&amp;nbsp; Stack Limit&amp;nbsp;&amp;nbsp; Stack Used&amp;nbsp;&amp;nbsp; %% Used&amp;nbsp;&amp;nbsp; Overflow?\n");&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; size = _QUEUE_GET_SIZE(&amp;amp;kernel_data_ptr-&amp;gt;TD_LIST);&lt;/P&gt;
&lt;P&gt;@@ -352,7 +352,7 @@&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; percent = ((_mqx_uint_ptr)td_ptr-&amp;gt;STACK_BASE - stack_used) * 100 / ((_mqx_uint_ptr)td_ptr-&amp;gt;STACK_BASE - (_mqx_uint_ptr)td_ptr-&amp;gt;STACK_LIMIT);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf ("%s&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; %ld %%&amp;nbsp;&amp;nbsp; %s\n", task_name, td_ptr-&amp;gt;STACK_BASE, td_ptr-&amp;gt;STACK_LIMIT, stack_used, percent,percent&amp;gt;=100?"Yes":"No");&lt;/P&gt;
&lt;P&gt;+&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf ("%s&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; 0x%lx&amp;nbsp;&amp;nbsp; %ld %%&amp;nbsp;&amp;nbsp; %s\n", task_name, *(uint_32*)(td_ptr-&amp;gt;STACK_PTR + 64)-1, td_ptr-&amp;gt;STACK_BASE, td_ptr-&amp;gt;STACK_LIMIT, stack_used, percent,percent&amp;gt;=100?"Yes":"No");&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; size--;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; td_ptr = (TD_STRUCT_PTR)((uchar_ptr)(td_ptr-&amp;gt;TD_LIST_INFO.NEXT) - FIELD_OFFSET(TD_STRUCT,TD_LIST_INFO));&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That patch applies to MQX 4.0.1 rather than the latest, but it looks like the source hasn't changed much since then.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Mar 2015 20:29:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390725#M13056</guid>
      <dc:creator>matthewkendall</dc:creator>
      <dc:date>2015-03-18T20:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: In KDS, is there a way to view all MQX tasks' debug program stack?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390726#M13057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a feature sorely missed by myself as well. I would continue using Codewarrior for this reason alone if they were continuing support for MQX and Kinetis K series with it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 May 2015 16:40:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/In-KDS-is-there-a-way-to-view-all-MQX-tasks-debug-program-stack/m-p/390726#M13057</guid>
      <dc:creator>ironsean</dc:creator>
      <dc:date>2015-05-15T16:40:44Z</dc:date>
    </item>
  </channel>
</rss>

