Stack trace broken in KDS 3.1 & FreeRTOS

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Stack trace broken in KDS 3.1 & FreeRTOS

ソリューションへジャンプ
1,302件の閲覧回数
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,007件の閲覧回数
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,008件の閲覧回数
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 件の賞賛
返信