Stack trace broken in KDS 3.1 & FreeRTOS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Stack trace broken in KDS 3.1 & FreeRTOS

跳至解决方案
1,312 次查看
joseraffucci
Contributor IV

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:

 

139019_139019.jpgfrom main.jpg

 

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

 

139020_139020.jpgfrom 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.

 

139021_139021.jpgfrom task iar.jpg

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

 

139022_139022.jpgScreenshot_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

标签 (1)
0 项奖励
回复
1 解答
1,017 次查看
joseraffucci
Contributor IV

Looks like Erich has once again provided a solution well before I even had a chance to chase the problem much in this thread.

Solution:  Add the following to the FreeRTOSConfig.h

#define configTASK_RETURN_ADDRESS   0  /* return address of task is zero */

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,018 次查看
joseraffucci
Contributor IV

Looks like Erich has once again provided a solution well before I even had a chance to chase the problem much in this thread.

Solution:  Add the following to the FreeRTOSConfig.h

#define configTASK_RETURN_ADDRESS   0  /* return address of task is zero */

0 项奖励
回复