<?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>Kinetis Design Studio中的主题 Re: Stack trace broken in KDS 3.1 &amp; FreeRTOS</title>
    <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Stack-trace-broken-in-KDS-3-1-FreeRTOS/m-p/502434#M6333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like Erich has once again provided a solution well before I even had a chance to chase the problem much in &lt;A _jive_internal="true" href="https://community.nxp.com/message/458650#458650http:"&gt;this &lt;/A&gt;thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&amp;nbsp; Add the following to the FreeRTOSConfig.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define configTASK_RETURN_ADDRESS&amp;nbsp;&amp;nbsp; 0&amp;nbsp; /* return address of task is zero */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Feb 2016 00:28:53 GMT</pubDate>
    <dc:creator>joseraffucci</dc:creator>
    <dc:date>2016-02-11T00:28:53Z</dc:date>
    <item>
      <title>Stack trace broken in KDS 3.1 &amp; FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Stack-trace-broken-in-KDS-3-1-FreeRTOS/m-p/502433#M6332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having trouble getting KDS to show me the stack trace when in task context in FreeRTOS.&amp;nbsp; Using the httpsrv sample app from KSDK2.0 on a FRDMK64F board.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When tracing a function that's called from main, it works as expected:&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="139019_139019.jpg"&gt;&lt;IMG alt="139019_139019.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/121060iAD0FF24CBF24D71C/image-size/large?v=v2&amp;amp;px=999" title="139019_139019.jpg" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="from main.jpg"&gt;&lt;IMG alt="from main.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/6238i7DE6A29D191301E7/image-size/large?v=v2&amp;amp;px=999" title="from main.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when a breakpoint is hit that's in a task, I only see the current call.&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="139020_139020.jpg"&gt;&lt;IMG alt="139020_139020.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/121061i031D05EC81B0C676/image-size/large?v=v2&amp;amp;px=999" title="139020_139020.jpg" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="from task.jpg"&gt;&lt;IMG alt="from task.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/32979i80B4A3D0A4EF230B/image-size/large?v=v2&amp;amp;px=999" title="from task.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The stack appears to be ok since I can step back up without incident and the program appears to work ok.&amp;nbsp; I've tested the same sample program using IAR and it behaves as expected.&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="139021_139021.jpg"&gt;&lt;IMG alt="139021_139021.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/121062iB948B0A39A546B32/image-size/large?v=v2&amp;amp;px=999" title="139021_139021.jpg" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="from task iar.jpg"&gt;&lt;IMG alt="from task iar.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/33086i09B7078C63A9A0F8/image-size/large?v=v2&amp;amp;px=999" title="from task iar.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Behavior is consistent in any task I try to stop in.&amp;nbsp; KDS has all patches applied &amp;amp; updates applied.&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="139022_139022.jpg"&gt;&lt;IMG alt="139022_139022.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/121063iC916AB0C6B9DB72A/image-size/large?v=v2&amp;amp;px=999" title="139022_139022.jpg" /&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="Screenshot_021016_013714_PM.jpg"&gt;&lt;IMG alt="Screenshot_021016_013714_PM.jpg" src="https://community.nxp.com/t5/image/serverpage/image-id/33233i343633ED4426C0A3/image-size/large?v=v2&amp;amp;px=999" title="Screenshot_021016_013714_PM.jpg" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When I try to manually dump the stack trace from gdb, I get a memory access error.&amp;nbsp; MCU-gdb misconfiguration?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Copyright (C) 2013 Free Software Foundation, Inc.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN&gt;License GPLv3+: GNU GPL version 3 or later &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gnu.org/licenses/gpl.html" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://gnu.org/licenses/gpl.html&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This is free software: you are free to change and redistribute it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;There is NO WARRANTY, to the extent permitted by law.&amp;nbsp; Type "show copying"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;and "show warranty" for details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;For bug reporting instructions, please see:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www.gnu.org/software/gdb/bugs/" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank"&gt;http://www.gnu.org/software/gdb/bugs/&lt;/A&gt;&lt;SPAN&gt;&amp;gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Warning: the current language does not match this frame.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Breakpoint 2, http_server_netconn_thread (arg=0x0 &amp;lt;__isr_vector&amp;gt;) at C:/Freescale/SDK_2.0_MK64FN1M0xxx12-slice6/boards/frdmk64f/demo_apps/lwip/lwip_ptpd/freertos/lwip_ptpd_freertos.c:165&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;165&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; netconn_bind(conn, NULL, 80);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;bt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;#0&amp;nbsp; http_server_netconn_thread (arg=0x0 &amp;lt;__isr_vector&amp;gt;) at C:/Freescale/SDK_2.0_MK64FN1M0xxx12-slice6/boards/frdmk64f/demo_apps/lwip/lwip_ptpd/freertos/lwip_ptpd_freertos.c:165&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Cannot access memory at address 0xa5a5a5b9&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;#1&amp;nbsp; 0x0000db28 in pxPortInitialiseStack (pxTopOfStack=&amp;lt;error reading variable: Cannot access memory at address 0xa5a5a5b1&amp;gt;, pxCode=&amp;lt;error reading variable: Cannot access memory at address 0xa5a5a5ad&amp;gt;, pvParameters=&amp;lt;error reading variable: Cannot access memory at address 0xa5a5a5a9&amp;gt;) at C:/Freescale/SDK_2.0_MK64FN1M0xxx12-slice6/rtos/freertos_8.2.3/Source/portable/GCC/ARM_CM4F/port.c:279&lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:28:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Stack-trace-broken-in-KDS-3-1-FreeRTOS/m-p/502433#M6332</guid>
      <dc:creator>joseraffucci</dc:creator>
      <dc:date>2020-11-02T13:28:27Z</dc:date>
    </item>
    <item>
      <title>Re: Stack trace broken in KDS 3.1 &amp; FreeRTOS</title>
      <link>https://community.nxp.com/t5/Kinetis-Design-Studio/Stack-trace-broken-in-KDS-3-1-FreeRTOS/m-p/502434#M6333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like Erich has once again provided a solution well before I even had a chance to chase the problem much in &lt;A _jive_internal="true" href="https://community.nxp.com/message/458650#458650http:"&gt;this &lt;/A&gt;thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&amp;nbsp; Add the following to the FreeRTOSConfig.h&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define configTASK_RETURN_ADDRESS&amp;nbsp;&amp;nbsp; 0&amp;nbsp; /* return address of task is zero */&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Feb 2016 00:28:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Design-Studio/Stack-trace-broken-in-KDS-3-1-FreeRTOS/m-p/502434#M6333</guid>
      <dc:creator>joseraffucci</dc:creator>
      <dc:date>2016-02-11T00:28:53Z</dc:date>
    </item>
  </channel>
</rss>

