AnsweredAssumed Answered

KDS 3.2 TAD BUG using MQX - NullPointerException

Question asked by thiagow on Aug 29, 2016
Latest reply on Aug 31, 2016 by thiagow

I did the migration from kds2.0 to kds3.2  and have problems to debug my MQX 4.1.1 application using the MQX TAD plugin to see the stack sizes, tasks, etc.

 

It's impossible to debug and using the TAD , because this plugins have a bug and show a NullPointerException using TAD log:

 

(16:19:15.854) INFO: [TadState] TAD state init (NONE)
(16:19:30.131) INFO: [TadModel] DSF session ID 0 has started
(16:19:33.205) INFO: [TadState] TAD state changed from DEBUG_STARTED to DEBUG_INIT_0 (Suspended, USER_REQUEST)
(16:19:49.349) INFO: [TadState] TAD state changed from DEBUG_INIT_0 to DEBUG_INIT_1 (Resumed, USER_REQUEST)
(16:19:49.421) INFO: [TadState] TAD state changed from DEBUG_INIT_1 to DEBUG_SUSPENDED (Suspended, BREAKPOINT)
(16:19:54.539) INFO: [TadState] TAD state changed from DEBUG_SUSPENDED to DEBUG_RESUMED (Resumed, USER_REQUEST)
(16:19:58.762) INFO: [TadState] TAD state changed from DEBUG_RESUMED to READY (Suspended, SIGNAL)
(16:19:59.770) ReadingException: com.freescale.mqx.gdb.tad.model.globalstatus.TadGlobalStatusFactory.getGlobalStatus() at 33.line "readLongVariableSafely(_mqxlite_version_number)"
(16:19:59.787) INFO: [TadGlobalStatusFactory] MQX data valid (version 4.1.1 (0x04010001))
(16:19:59.787) INFO: [TadModel$3] Loading of TAD Global Status took 1021 ms
(16:19:59.787) INFO: [TadGlobalStatusController] TAD global status data is ready!
(16:20:02.369) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:20:04.866) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:20:06.090) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:20:07.427) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:20:08.681) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:20:48.952) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:20:50.135) NullPointerException: com.freescale.mqx.gdb.tad.model.tasklist.TaskFactory.getData() at 71.line "readMemoryBlock32bit()"
(16:21:05.921) INFO: [TadState] TAD state changed from READY to DEBUG_RESUMED (Resumed, USER_REQUEST)

 

When I click in "About MQX RTOS TAD" no windows is displayed

 

My problem is equal of this already opened topic:    MQX Kernel Log window is empty 

 

My MQX is :    4.1.1

My KDS is:    3.2

My OS:     Ubuntu 12.04 64 bits

I did all KDS3.2 updates and installed MQX TAD. The installed is:     MQX RTOS Task Aware Debugger for GDB 1.0.9.201508111009 com.freescale.mqx.gdb.tad.eclipse.feature.group Freescale Semiconductor, Inc.

My board is: frdm-k64f

My flash device is:   Multilink Universal

 

I already compiled bsp, psp, rtcs and my project with debug ( gcc -pg) and without optimization (gcc -O0)    and set  #define MQX_KERNEL_LOGGING 1   and #define MQX_ENABLE_LOGS 1       but   the TAD doesn't work. I already applied this patch in mqx.c   but without result:

 

 

Index: mqx_source/MQX_4_1_1_LINUX_GA/mqx/source/kernel/mqx.c
===================================================================
--- mqx_source/MQX_4_1_1_LINUX_GA/mqx/source/kernel/mqx.c (revisão 3697)
+++ mqx_source/MQX_4_1_1_LINUX_GA/mqx/source/kernel/mqx.c (cópia de trabalho)
@@ -171,8 +171,10 @@
* as direct constant assignment when optimization level is high.
* Note that counter will be immediately reset to zero on the subsequent
* _mem_zero call. */
- *(volatile void **) kernel_data = (void *) & _mqx_version_number;
- *(volatile void **) kernel_data = (void *) & _mqx_vendor;
+ //*(volatile void **) kernel_data = (void *) & _mqx_version_number;
+ ((volatile void **) kernel_data)[0] = (void *) & _mqx_version_number;
+ //*(volatile void **) kernel_data = (void *) & _mqx_vendor;
+ ((volatile void **) kernel_data)[1] = (void *) & _mqx_vendor;

 

I already enabled the kernel log in user_config.h, but don't have success:

/* DESABILITAR EM RELEASE */
#define MQX_KERNEL_LOGGING 1
#define MQX_USE_LOGS 1

 

 

Does anybody have any idea?

Original Attachment has been moved to: TAD_log_160829_161056.log.zip

Original Attachment has been moved to: TAD_log_160829_162058.log.zip

Original Attachment has been moved to: TAD_log_160829_162109.log.zip

Outcomes