Translating MQX error codes

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

Translating MQX error codes

跳至解决方案
2,626 次查看
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,203 次查看
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,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 项奖励
回复
1,203 次查看
waynehawthorne
Contributor I

Many thanks!

Cheers

0 项奖励
回复