AnsweredAssumed Answered

Stack trace broken in KDS 3.1 & FreeRTOS

Question asked by Jose Raffucci on Feb 10, 2016
Latest reply on Feb 10, 2016 by Jose Raffucci

I'm having trouble getting KDS to show me the stack trace when in task context in FreeRTOS.  Using the httpsrv sample app from KSDK2.0 on a FRDMK64F board.

 

When tracing a function that's called from main, it works as expected:

 

from main.jpg

 

However, when a breakpoint is hit that's in a task, I only see the current call.

 

from task.jpg

The stack appears to be ok since I can step back up without incident and the program appears to work ok.  I've tested the same sample program using IAR and it behaves as expected.

 

from task iar.jpg

Behavior is consistent in any task I try to stop in.  KDS has all patches applied & updates applied.

 

Screenshot_021016_013714_PM.jpg

When I try to manually dump the stack trace from gdb, I get a memory access error.  MCU-gdb misconfiguration?

 

GNU gdb (GNU Tools for ARM Embedded Processors) 7.6.0.20140731-cvs

Copyright (C) 2013 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "--host=i686-w64-mingw32 --target=arm-none-eabi".

For bug reporting instructions, please see:

<http://www.gnu.org/software/gdb/bugs/>.

Warning: the current language does not match this frame.

 

Breakpoint 2, http_server_netconn_thread (arg=0x0 <__isr_vector>) at C:/Freescale/SDK_2.0_MK64FN1M0xxx12-slice6/boards/frdmk64f/demo_apps/lwip/lwip_ptpd/freertos/lwip_ptpd_freertos.c:165

165        netconn_bind(conn, NULL, 80);

bt

#0  http_server_netconn_thread (arg=0x0 <__isr_vector>) at C:/Freescale/SDK_2.0_MK64FN1M0xxx12-slice6/boards/frdmk64f/demo_apps/lwip/lwip_ptpd/freertos/lwip_ptpd_freertos.c:165

Cannot access memory at address 0xa5a5a5b9

#1  0x0000db28 in pxPortInitialiseStack (pxTopOfStack=<error reading variable: Cannot access memory at address 0xa5a5a5b1>, pxCode=<error reading variable: Cannot access memory at address 0xa5a5a5ad>, pvParameters=<error reading variable: Cannot access memory at address 0xa5a5a5a9>) at C:/Freescale/SDK_2.0_MK64FN1M0xxx12-slice6/rtos/freertos_8.2.3/Source/portable/GCC/ARM_CM4F/port.c:279

Outcomes