Translating MQX error codes

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

Translating MQX error codes

ソリューションへジャンプ
2,627件の閲覧回数
waynehawthorne
Contributor I

Hello...

I've been searching through the various fora and the documentation and I can't seem to find the answer I'm looking for.

I'm running code that has a call to _task_get_error().  Most of the time, this returns 0, however, in some calls, I see a different error code produced.  How do you translate the error code to a useable statement?  Other RTOS's provide either a .h file or a function that translates system error codes to human-readable statements...does MQX provide this?

Thanks!

ラベル(1)
0 件の賞賛
返信
1 解決策
1,204件の閲覧回数
c0170
Senior Contributor III

Hello Wayne Hawthome,

file mqx.h has section  TASK ERROR CODES where are error codes which are used by Kernel. I'll share at least the start of those:

#define MQX_INVALID_POINTER             (MQX_ERROR_BASE|0x01)
#define MQX_INVALID_SIZE                (MQX_ERROR_BASE|0x02)
#define MQX_NOT_RESOURCE_OWNER          (MQX_ERROR_BASE|0x03)

This header file is located at mqx/source/include

Regards,

MartinK

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,205件の閲覧回数
c0170
Senior Contributor III

Hello Wayne Hawthome,

file mqx.h has section  TASK ERROR CODES where are error codes which are used by Kernel. I'll share at least the start of those:

#define MQX_INVALID_POINTER             (MQX_ERROR_BASE|0x01)
#define MQX_INVALID_SIZE                (MQX_ERROR_BASE|0x02)
#define MQX_NOT_RESOURCE_OWNER          (MQX_ERROR_BASE|0x03)

This header file is located at mqx/source/include

Regards,

MartinK

0 件の賞賛
返信
1,204件の閲覧回数
waynehawthorne
Contributor I

Many thanks!

Cheers

0 件の賞賛
返信