Skip to content

Remove Cellular dependency in netsocket #13809

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 2 commits into from
Dec 17, 2020

Conversation

jeromecoutant
Copy link
Collaborator

Summary of changes

Proposition is to be able to remove Cellular code in mbed-os

How to reproduce:
Create a .mbedignore file with

mbed-os/connectivity/cellular*
mbed-os/connectivity/drivers/cellular*

Impact of changes

Migration actions required

Documentation


Pull request type

[x] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[] No Tests required for this change (E.g docs only update)
[x] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@ciarmcom ciarmcom added the release-type: patch Indentifies a PR as containing just a patch label Oct 23, 2020
@ciarmcom ciarmcom requested a review from a team October 23, 2020 15:00
@ciarmcom
Copy link
Member

@jeromecoutant, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@pan-
Copy link
Member

pan- commented Oct 23, 2020

Thanks @jeromecoutant I don't think you need the .mbedignore file if you don't add cellular to the require clause in mbed_app.json .

The PR is a good starting point but I believe more work is required to pass it through. If cellular is not present then CellularInterface.h, CellularNonIPSocket.h and ControlPlane_netif.h should not return any content when included.

0xc0170
0xc0170 previously approved these changes Oct 26, 2020
Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

This shall work also with CMake (although we will need to remove linking netsockets to cellular as it was dependent before this patch).
It should be other way around, if cellular is selected, netsockets would get in as well.

Thanks @jeromecoutant I don't think you need the .mbedignore file if you don't add cellular to the require clause in mbed_app.json .

I assume this is for not using baremetal, but Mbed OS with ignoring some parts - an example: using networking via wire but not cellular.

@mergify mergify bot added needs: CI and removed needs: review labels Oct 26, 2020
@0xc0170 0xc0170 requested a review from a team October 26, 2020 11:36
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 26, 2020

Set as needs: work, to verify the files mentioned above.

@jeromecoutant
Copy link
Collaborator Author

jeromecoutant commented Nov 2, 2020

Set as needs: work, to verify the files mentioned above.

I think there is no risk to accept this PR as it is.
Up to you to go further in some other PR ?

Thx

@pan-
Copy link
Member

pan- commented Nov 4, 2020

@jeromecoutant This PR doesn't work with ARMC6:

[Error] @0,0: L6218E: Undefined symbol CellularInterface::get_target_default_instance() (referred from BUILD/NRF52840_DK/ARMC6/mbed-os/connectivity/netsocket/source/NetworkInterfaceDefaults.o).

@jeromecoutant
Copy link
Collaborator Author

@pan-

This PR doesn't work with ARMC6:

Can you explicit your use case ?
For me, it seems OK:

mbed test -t ARM -m NRF52840_DK -v -n connectivity-*
Build successes:
  * NRF52840_DK::ARMC6::CONNECTIVITY-FEATURE_BLE-SOURCE-CORDIO-TESTS-CORDIO_HCI-DRIVER
  * NRF52840_DK::ARMC6::CONNECTIVITY-MBEDTLS-TESTS-TESTS-MBEDTLS-MULTI
  * NRF52840_DK::ARMC6::CONNECTIVITY-MBEDTLS-TESTS-TESTS-MBEDTLS-SELFTEST
  * NRF52840_DK::ARMC6::CONNECTIVITY-NETSOCKET-TESTS-TESTS-NETWORK-L3IP
  * NRF52840_DK::ARMC6::MBED-BUILD

@pan-
Copy link
Member

pan- commented Nov 4, 2020

@jeromecoutant Here are the steps to reproduce it:

  • Import mbed os blinky example
  • Add a .mbedignore file that excludes mbed-os/connectivity/cellular* and mbed-os/connectivity/drivers/cellular*
  • Compile

@jeromecoutant
Copy link
Collaborator Author

OK, patch improved, please start CI

@jeromecoutant
Copy link
Collaborator Author

Patch needed for #13598 workaround

Copy link
Contributor

@0xc0170 0xc0170 left a comment

Choose a reason for hiding this comment

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

Do we need that many if PRESENT in NEtworkInterfaceDefaults? I wonder if we can gather methods together and have just one (so it is not spreaded all over the file ) ?

This should help also CMake as well as it uses the same _PRESENT for components (backward compatibility),

#include "CellularDevice.h"
#endif // MBED_CONF_CELLULAR_PRESENT
Copy link
Contributor

Choose a reason for hiding this comment

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

the comment states something different, is this app baudrate rather than cellular present?

Copy link
Collaborator Author

@jeromecoutant jeromecoutant Nov 9, 2020

Choose a reason for hiding this comment

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

Just added the same ifdef as it is already done bellow in this file

@jeromecoutant
Copy link
Collaborator Author

Let's start CI ?

@jeromecoutant
Copy link
Collaborator Author

ping

@0xc0170 0xc0170 requested review from a team and 0xc0170 November 23, 2020 13:42
@0xc0170
Copy link
Contributor

0xc0170 commented Nov 23, 2020

CI started

I requested connectivity team to review

Tip: Create a .mbedignore file with

connectivity/cellular*
connectivity/drivers/cellular*
@jeromecoutant
Copy link
Collaborator Author

Please check

Done

@0xc0170 0xc0170 requested a review from pan- December 9, 2020 16:25
0xc0170
0xc0170 previously approved these changes Dec 9, 2020
@mergify mergify bot added needs: CI and removed needs: review labels Dec 9, 2020
@0xc0170
Copy link
Contributor

0xc0170 commented Dec 9, 2020

CI started

pan-
pan- previously approved these changes Dec 9, 2020
@mbed-ci
Copy link

mbed-ci commented Dec 9, 2020

Jenkins CI Test : ❌ FAILED

Build Number: 2 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 10, 2020

@jeromecoutant unittests require update. see the failures in the logs


[2020-12-09T16:43:26.709Z] /builds/workspace/mbed-os-ci_unittests@2/unitTest-7245/mbed-os/connectivity/netsocket/tests/UNITTESTS/netsocket/CellularNonIPSocket/test_CellularNonIPSocket.cpp:43: undefined reference to `mbed::CellularNonIPSocket::CellularNonIPSocket()'

@mergify mergify bot dismissed stale reviews from 0xc0170 and pan- December 17, 2020 14:37

Pull request has been modified.

@jeromecoutant
Copy link
Collaborator Author

unittests require update. see the failures in the logs

Done, Thx @0xc0170

@mbed-ci
Copy link

mbed-ci commented Dec 17, 2020

Jenkins CI Test : ✔️ SUCCESS

Build Number: 3 | 🔒 Jenkins CI Job | 🌐 Logs & Artifacts

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-test ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 9315f05 into ARMmbed:master Dec 17, 2020
@mergify mergify bot removed the ready for merge label Dec 17, 2020
@mbedmain mbedmain added release-version: 6.7.0 Release-pending and removed release-type: patch Indentifies a PR as containing just a patch Release-pending labels Jan 25, 2021
@jeromecoutant jeromecoutant deleted the PR_CELLULAR branch April 23, 2021 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants