Skip to content

[RTOS] Improved Error Functions #1716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 5, 2016
Merged

[RTOS] Improved Error Functions #1716

merged 1 commit into from
May 5, 2016

Conversation

neilt6
Copy link
Contributor

@neilt6 neilt6 commented May 5, 2016

Added error message to sysThreadError(), and improved os_error().

Added error message to sysThreadError(), and improved os_error().
@neilt6 neilt6 mentioned this pull request May 5, 2016
@0xc0170 0xc0170 merged commit 84fc61c into ARMmbed:master May 5, 2016
void os_error (uint32_t err_code) {
/* This function is called when a runtime error is detected. Parameter */
/* 'err_code' holds the runtime error code (defined in RTX_Config.h). */
osThreadId err_task = svcThreadGetId();
error("CMSIS RTX error code: 0x%08X, task ID: 0x%08X\n", err_code, (uint32_t)err_task);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: err_task doesn't need an explicit cast, since it will be automatically promoted during the variadic function call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants