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

Eth: STM32: Overriding HAL callbacks in stm32xx #14926

Merged
merged 1 commit into from
Aug 26, 2021

Conversation

katherrafi
Copy link
Contributor

@katherrafi katherrafi commented Jul 15, 2021

Summary of changes

This commit enables the Overriding of HAL callbacks and IRQHandler
in stm32xx_emac.cpp. Hence the user can have their own
implementations of callbacks and IRQHandler functions.
This solves the issue #13554
Signed-off-by: Kather Rafi Ibrahim [email protected]

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 requested review from a team July 15, 2021 15:00
@ciarmcom
Copy link
Member

@katherrafi, thank you for your changes.
@ARMmbed/team-st-mcd @ARMmbed/mbed-os-connectivity @ARMmbed/mbed-os-maintainers please review.

@jeromecoutant
Copy link
Collaborator

@pgscada

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.

Reading the comment #13554 (comment) , is this the proper fix ?

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 20, 2021

From the discussion, the comment @kjbracey-arm provided: #13554 (comment) - do we want to support this, basically patching STM emac, shouldn't they inherit this emac driver and do customization on their own? Is it enough just these 2 callbacks?

Adding two weakly functions and their strong definition looks fine just making sure.

@ciarmcom ciarmcom added the stale Stale Pull Request label Jul 23, 2021
@ciarmcom
Copy link
Member

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/Team-ST-MCD, @ARMmbed/mbed-os-connectivity, please complete review of the changes to move the PR forward. Thank you for your contributions.

@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels Jul 23, 2021
@0xc0170
Copy link
Contributor

0xc0170 commented Jul 27, 2021

@ARMmbed/team-st-mcd Please review

@ciarmcom ciarmcom added stale Stale Pull Request and removed stale Stale Pull Request labels Jul 27, 2021
@prasannaven
Copy link

Reminder for review and trigger CI.

@ciarmcom ciarmcom removed the stale Stale Pull Request label Aug 3, 2021
@0xc0170 0xc0170 added release-type: patch Indentifies a PR as containing just a patch and removed release-type: feature labels Aug 4, 2021
0xc0170
0xc0170 previously approved these changes Aug 4, 2021
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.

If @ARMmbed/team-st-mcd is happy with the proposed fix

@mergify mergify bot added needs: CI and removed needs: review labels Aug 4, 2021
@katherrafi
Copy link
Contributor Author

From the discussion, the comment @kjbracey-arm provided: #13554 (comment) - do we want to support this, basically patching STM emac, shouldn't they inherit this emac driver and do customization on their own? Is it enough just these 2 callbacks?

Adding two weakly functions and their strong definition looks fine just making sure.

In this way we can enable as specified by the comment 13554, #13022. Only this two callbacks are supported in the default driver as of now, hence we did the same.

@ciarmcom ciarmcom added the stale Stale Pull Request label Aug 5, 2021
@ciarmcom
Copy link
Member

ciarmcom commented Aug 5, 2021

This pull request has automatically been marked as stale because it has had no recent activity. @ARMmbed/mbed-os-maintainers, please start CI to get the PR merged.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 16, 2021

CI started

@mergify mergify bot added needs: work and removed needs: CI labels Aug 16, 2021
@mbed-ci
Copy link

mbed-ci commented Aug 16, 2021

Jenkins CI Test : ❌ FAILED

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

CLICK for Detailed Summary

jobs Status
jenkins-ci/mbed-os-ci_unittests ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-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_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM
jenkins-ci/mbed-os-ci_cmake-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-example-ARM
jenkins-ci/mbed-os-ci_build-example-GCC_ARM

@jeromecoutant
Copy link
Collaborator

jeromecoutant commented Aug 16, 2021

I think a #if DEVICE_EMAC is missing in stm32xx_eth_irq_callback.cpp

This commit enables the Overriding of HAL callbacks and IRQHandler
in stm32xx_emac.cpp. Hence the user can have their own
implementations of callbacks and IRQHandler functions.

Signed-off-by: Kather Rafi Ibrahim <[email protected]>
@katherrafi katherrafi force-pushed the hal_callback_override branch from df5725f to a9f51e3 Compare August 25, 2021 09:01
@mergify mergify bot dismissed 0xc0170’s stale review August 25, 2021 09:02

Pull request has been modified.

@katherrafi
Copy link
Contributor Author

I think a #if DEVICE_EMAC is missing in stm32xx_eth_irq_callback.cpp

This is updated in the code.

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 25, 2021

CI started

@mergify
Copy link

mergify bot commented Aug 25, 2021

Sorry but I didn't understand the command. Please consult the commands documentation 📚.

Hey, I reacted but my real name is @Mergifyio

@mbed-ci
Copy link

mbed-ci commented Aug 25, 2021

Jenkins CI Test : ✔️ SUCCESS

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-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-cloud-example-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-ARM ✔️
jenkins-ci/mbed-os-ci_build-greentea-GCC_ARM ✔️
jenkins-ci/mbed-os-ci_cmake-example-ARM ✔️
jenkins-ci/mbed-os-ci_cmake-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_greentea-test ✔️

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.

8 participants