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

Update Lwip error calls to use new error codes and mbed_error call #7725

Merged
merged 1 commit into from Aug 9, 2018

Conversation

Projects
None yet
5 participants
@SenRamakri
Contributor

SenRamakri commented Aug 7, 2018

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

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Feature
[ ] Breaking change

@SenRamakri SenRamakri requested a review from SeppoTakalo Aug 7, 2018

@cmonr cmonr requested a review from kjbracey-arm Aug 8, 2018

@cmonr cmonr added the needs: review label Aug 8, 2018

@cmonr

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");

This comment has been minimized.

@cmonr

cmonr Aug 8, 2018

Contributor

What's the difference between MBED_ERROR1 and MBED_ERROR?

This comment has been minimized.

@SenRamakri

SenRamakri Aug 8, 2018

Contributor

@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

This comment has been minimized.

@cmonr

cmonr Aug 8, 2018

Contributor

Making a note here that this'll probably result in a code size increase.

This comment has been minimized.

@SenRamakri

SenRamakri Aug 8, 2018

Contributor

Oh, I didn't intend to make that change. I'll look into that.

@SenRamakri SenRamakri force-pushed the SenRamakri:sen_LwipMbedErrorUpdate branch from b144ded to 01c46f0 Aug 8, 2018

@SenRamakri

This comment has been minimized.

Contributor

SenRamakri commented Aug 8, 2018

@cmonr - I have addressed the review comments, please review.

@cmonr

cmonr approved these changes Aug 8, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 8, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Aug 8, 2018

Build : SUCCESS

Build number : 2764
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7725/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr cmonr added ready for merge and removed needs: CI labels Aug 9, 2018

@cmonr cmonr merged commit 1a5b3e0 into ARMmbed:master Aug 9, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 568 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9188 cycles (-76 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Aug 9, 2018

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018

Merge pull request ARMmbed#7725 from SenRamakri/sen_LwipMbedErrorUpdate
Update Lwip error calls to use new error codes and mbed_error call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment