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

STM Sleep change dependency func from static to WEAK #15448

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

hallard
Copy link
Contributor

@hallard hallard commented Aug 22, 2023

Summary of changes

change staticto WEAK for:

  • ForcePeriphOutofDeepSleep
  • ForceOscOutofDeepSleep
  • wait_loop

Impact of changes

Migration actions required

Documentation

Since deep_sleep is declared as WEAK (perfect), I needed on STM32 to create my own deep_sleep because I need sleep to be STOP1 and not STOP2 (I'm using LPTIM2 in counter mode but that's another story)

But as deep_sleep calls ForcePeriphOutofDeepSleep, ForceOscOutofDeepSleep and wait_loop and as they are declared static they are unreachable from my code from link stage.

So I needed to duplicate them into my code (not my favorite) to get it working.
But best is to remove static so I can call them from my own deep_sleep (and put them also as WEAK to be consistent) without need to duplicate code. Also this will avoid to check for any changes on original code to replicate it on my own.


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

@jeromecoutant @0xc0170


@hallard hallard changed the title STM Sleep change static to WEAK STM Sleep change dependency func from static to WEAK Aug 22, 2023
Copy link
Collaborator

@jeromecoutant jeromecoutant left a comment

Choose a reason for hiding this comment

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

Let's check CI result

@mergify mergify bot added the needs: CI label Aug 24, 2023
@0xc0170
Copy link
Contributor

0xc0170 commented Aug 24, 2023

CI started

@0xc0170 0xc0170 added the release-type: patch Indentifies a PR as containing just a patch label Aug 24, 2023
@mbed-ci
Copy link

mbed-ci commented Aug 24, 2023

Jenkins CI Test : ✔️ SUCCESS

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-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-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_greentea-test ✔️

@0xc0170 0xc0170 merged commit 67c25e8 into ARMmbed:master Aug 28, 2023
20 checks passed
@mergify mergify bot removed the ready for merge label Aug 28, 2023
@hallard hallard deleted the STM32_weak_deepsleep branch September 8, 2023 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-type: patch Indentifies a PR as containing just a patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants