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

Refactored away onboard_modem_api because it is not needed at all #12092

Merged
merged 4 commits into from
Dec 27, 2019

Conversation

AnttiKauppila
Copy link

@AnttiKauppila AnttiKauppila commented Dec 12, 2019

Summary of changes

Refactored away onboard_modem_api because it is not needed at all
All targets must implement soft_- and hard_power_on/off() functions which are practically same what onboard_modem_api offered.
These were seen as a duplicate features and therefore we removed this.
All targets involved have been updated to reflect the changes as this is "an internal feature break"

This will clean up the needed logic for Mbed OS internal targets which are defined in targets.json. Less configuration = easier to maintain for everybody!

Also moved non-IP socket related classes into netsocket root folder. This won't break anything due to our build system.

Impact of changes

All cellular modems having onboard modem are affected. Code has been updated to reflect the changes.

Migration actions required

onboard_modem_api.h removed

Documentation

Refactored away onboard_modem_api because it is not needed at all
All targets must implement soft_- and hard_power_on/off() functions which are practically same what onboard_modem_api offered.
These were seen as a duplicate features and therefore we removed this.
All targets involved have been updated to reflect the changes as this is "an internal feature break"


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

@ARMmbed/mbed-os-wan

@AnttiKauppila AnttiKauppila changed the title Cellu refactor Refactored away onboard_modem_api because it is not needed at all Dec 12, 2019
@ciarmcom ciarmcom requested review from maclobdell and a team December 12, 2019 14:00
@ciarmcom
Copy link
Member

@AnttiKauppila, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

Copy link

@AriParkkila AriParkkila left a comment

Choose a reason for hiding this comment

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

Could still have qualified lookup for C functions..?

@40Grit
Copy link

40Grit commented Dec 13, 2019

@trowbridgec

@0xc0170
Copy link
Contributor

0xc0170 commented Dec 16, 2019

cc @ARMmbed/team-ublox @ARMmbed/team-multitech

@0xc0170 0xc0170 added the release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0 label Dec 16, 2019
@kjbracey
Copy link
Contributor

CI started

@AnttiKauppila
Copy link
Author

Unittests fixed

@mbed-ci
Copy link

mbed-ci commented Dec 17, 2019

Test run: FAILED

Summary: 4 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR


gpio_init_out_ex(&gpio, PIN_NAME_CELL_ON_OFF, 1);
gpio_write(&gpio, 0);
thread_sleep_for(time_ms);

Choose a reason for hiding this comment

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

Should the calls to thread_sleep_for() be changed to ThisThread::sleep_for() since this is now C++ and not C? I suppose the least amount of change the better to preserve functionality, but it's also good to follow convention. This would then apply to all affected modules as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

This isn't a matter of convention - the C version is guaranteed always available, as it's in platform. The C++ one is in rtos-api, which might not be in a minimal build (via requires: "bare-metal" or .mbedignore rtos). So the C version is appropriate for HAL code.

Choose a reason for hiding this comment

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

Ah ok, thanks for the clarification.


void onboard_modem_power_up();

void onboard_modem_power_down();

Choose a reason for hiding this comment

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

Should we consider making these functions public? Making them private restricts power optimization efforts at the application level which were previously available in the onboard_modem_api.c functions (e.g. turning off the cell module when not in use).

Copy link
Contributor

Choose a reason for hiding this comment

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

I would expect the power control from application end to be via higher-level calls to the cellular framework - those calls were always viewed as "driver core to hardware glue" type calls, and would be only part of the power saving. (You'd want to do serial port suspension too).

Whether higher-level application appropriate calls currently exist is another matter.

@kjbracey
Copy link
Contributor

CI restarted

@mbed-ci
Copy link

mbed-ci commented Dec 17, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@adbridge
Copy link
Contributor

@AnttiKauppila it looks like a previous merge has caused this to need a rebase.

@mbed-ci
Copy link

mbed-ci commented Dec 19, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

Antti Kauppila added 3 commits December 19, 2019 13:44
All targets must implement soft_- and hard_power_on/off() functions which are practically same what onboard_modem_api offered.
These were seen as a duplicate features and therefore we removed this.
All targets involved have been updated to reflect the changes
@AnttiKauppila
Copy link
Author

Build issue fixed

@mbed-ci
Copy link

mbed-ci commented Dec 19, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@AnttiKauppila
Copy link
Author

One more fix done

@mbed-ci
Copy link

mbed-ci commented Dec 19, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 5
Build artifacts

@adbridge
Copy link
Contributor

Restarted ci after update

@mbed-ci
Copy link

mbed-ci commented Dec 19, 2019

Test run: FAILED

Summary: 1 of 12 test jobs failed
Build number : 6
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_greentea-test

@kjbracey
Copy link
Contributor

DISCO L475 serial error. CI restarted

@mbed-ci
Copy link

mbed-ci commented Dec 20, 2019

Test run: SUCCESS

Summary: 12 of 12 test jobs passed
Build number : 7
Build artifacts

@bulislaw bulislaw merged commit e29cb19 into ARMmbed:master Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-version: 6.0.0-alpha-1 First pre-release version of 6.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.