Translating MQX error codes

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Translating MQX error codes

Jump to solution
2,007 Views
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!

Labels (1)
0 Kudos
1 Solution
584 Views
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

View solution in original post

0 Kudos
2 Replies
585 Views
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 Kudos
584 Views
waynehawthorne
Contributor I

Many thanks!

Cheers

0 Kudos