-
Notifications
You must be signed in to change notification settings - Fork 3k
Update Lwip error calls to use new error codes and mbed_error call #7725
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments.
@@ -418,7 +428,7 @@ void sys_init(void) { | |||
lwip_sys_mutex_attr.cb_size = sizeof(lwip_sys_mutex_data); | |||
lwip_sys_mutex = osMutexNew(&lwip_sys_mutex_attr); | |||
if (lwip_sys_mutex == NULL) | |||
error("sys_init error\n"); | |||
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_NETWORK_STACK, MBED_ERROR_CODE_INITIALIZATION_FAILED), "sys_init error, mutex initialization failed\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between MBED_ERROR1 and MBED_ERROR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmonr - MBED_ERROR1 takes an additional context specific parameter for the error context where as MBED_ERROR doesn't.
#include "mbed-trace/mbed_trace.h" | ||
|
||
void lwip_mbed_tracef_debug(const char *fmt, ...) | ||
{ | ||
va_list ap; | ||
#if MBED_CONF_LWIP_USE_MBED_TRACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making a note here that this'll probably result in a code size increase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't intend to make that change. I'll look into that.
b144ded
to
01c46f0
Compare
@cmonr - I have addressed the review comments, please review. |
/morph build |
Build : SUCCESSBuild number : 2764 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 2393 |
Test : SUCCESSBuild number : 2490 |
Update Lwip error calls to use new error codes and mbed_error call
Description
This is to update LWIP error() calls to use the new Mbed-OS Error handler methods, this enables use of error codes, produces more informative error report and also enables use of error decoding tools like Mbed-Error microsite - https://armmbed.github.io/mbedos-error/
Pull request type