IAR MQX TAD solution for "Unknown error" in Task error code (with KSDK)

Document created by Tomas Simicek Employee on Sep 7, 2015Last modified by ebiz_ws_prod on Dec 13, 2017
Version 4Show Document
  • View in full screen mode

Problem:

Unknown error in Task error code column (in Task List view from MQX TAD) is displayed when debugging MQX project in IAR with KSDK.

1.png

 

Cause:

This error means that TAD cannot find mqx.tad file with messages for error codes. In this case code 0x0 means MQX_OK, so it might lead user to believe there is some error with task but it is not.

IAR TAD was made before first KSDK release, so there is no way for IAR TAD to find mqx.tad file because it isn’t part of KSDK. It works only when classic MQX is also installed on computer.

 

IAR TAD finds mqx.tad file this way (written as example for MQX 4.2):

  • It takes _mqx_version_number defined as hex number 0x04020000 in “mqx\source\kernel\mqx.c”
  • Looks into windows registry key of specified MQX version “HKEY_LOCAL_MACHINE\SOFTWARE\Freescale\FreeScale MQX\4.2”
  • Takes its path variable "PATH"="C:\\Freescale\\Freescale_MQX_4_2"
  • Tries to find mqx.tad file in directory specified in PATH or in its child folder "\tools\tad\" (e.g. C:\Freescale\Freescale_MQX_4_2\tools\tad\mqx.tad)

 

Solution:

Use of fake registry key, which will point to classic MQX installation or some blank directory with only mqx.tad file (e.g. C:\fake_mqx\mqx.tad or better C:\Freescale\KSDK_1.2.0\tools\tad\mqx.tad). This registry key must use MQX version specified in used KSDK (for KSDK 1.2 and 1.3 it is 0x05000200, for 1.1 0x05000001 and for 1.0 0x04010000).

Registry key might look like this:

2.png

Then TAD translates error codes to messages successfully and path to mqx.tad file can be checked in Check for errors view under Show MQX TAD Diagnostics.

3.png

Attached is example registry key with \tad\mqx.tad structure for placing into KSDK\tools directory.

Original Attachment has been moved to: ksdk_mqx_tad_path.zip

Attachments

    Outcomes