Skip to content
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

Accessing mbed errors history #908

Open
Goliath86 opened this issue Jun 27, 2024 · 1 comment
Open

Accessing mbed errors history #908

Goliath86 opened this issue Jun 27, 2024 · 1 comment

Comments

@Goliath86
Copy link

Goliath86 commented Jun 27, 2024

Hi,
how can I access the functions mbed_get_error_hist_count() and mbed_get_error_hist_info()? I can't compile if I use it

This is the function I use to try to get the errors history:

void getErrorInfoFromHist() { mbed_error_ctx hist_error_ctx; int numEntriesInHist = mbed_get_error_hist_count(); for (int i = 0; i < numEntriesInHist; i++) { mbed_get_error_hist_info(i, &hist_error_ctx); printf(MBED_GET_ERROR_CODE(hist_error_ctx.error_status)); } mbed_clear_all_errors(); }

But when I compile I get:

undefined reference to mbed_get_error_hist_count
undefined reference to mbed_get_error_hist_info

Thank you

@pennam
Copy link
Contributor

pennam commented Jun 27, 2024

Hi @Goliath86 this two functions are not enabled by default if you need to use them you have to rebuild libmbed.a and enable MBED_CONF_PLATFORM_ERROR_HIST_ENABLED

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

No branches or pull requests

2 participants