Skip to content

RTOS: Remove dependency on cmsis dir #13463

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

Closed

Conversation

hugueskamba
Copy link
Collaborator

Summary of changes

This allows an independent CMake target for
the rtos library to be created without a circular
dependency.

Impact of changes

Migration actions required

Documentation


Pull request type

  • 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)
  • Covered by existing mbed-os tests (Greentea or Unittest)
  • Tests / results supplied as part of this PR

Reviewers


This allows an independent CMake target for
the `rtos` library to be created without a circular
dependency.
@ciarmcom ciarmcom requested review from a team August 18, 2020 18:00
@ciarmcom
Copy link
Member

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

@0xc0170
Copy link
Contributor

0xc0170 commented Aug 19, 2020

I've checked also upstream CMSIS5. See https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/Core_A/Source/irq_ctrl_gic.c

We should keep it as it is in the upstream (using vanilla version as they say). As result, we should have RTE Component for all cmsis related repositories (in our case - it is cmsis and rtx). The limitation of our current build system means to this that we can't have this header per component but one for all :/ This is how it is on master.

rtos needs cmsis anyway as it depends on it (I can see it uses cmsis_compiler.h from cmsis and possibly other files). However cmsis should compile without rtos (no depedency). This would explain the location of RTE Components in cmsis folder. It might be worth documenting it in the header itself.

With CMake, we can create RTE component per component (cmsis would have own, rtos would have own) or we provide one as well for all cmsis components within Mbed OS (specific Mbed OS RTE component), something to look at (how it should be done - I believe it is this way in cmsis packs as well, there is one RTE component where you configure all packs - we can use it the same way).

@mergify mergify bot removed the needs: review label Aug 19, 2020
@hugueskamba
Copy link
Collaborator Author

I've checked also upstream CMSIS5. See https://github.com/ARM-software/CMSIS_5/blob/develop/CMSIS/Core_A/Source/irq_ctrl_gic.c

We should keep it as it is in the upstream (using vanilla version as they say). As result, we should have RTE Component for all cmsis related repositories (in our case - it is cmsis and rtx). The limitation of our current build system means to this that we can't have this header per component but one for all :/ This is how it is on master.

rtos needs cmsis anyway as it depends on it (I can see it uses cmsis_compiler.h from cmsis and possibly other files). However cmsis should compile without rtos (no depedency). This would explain the location of RTE Components in cmsis folder. It might be worth documenting it in the header itself.

With CMake, we can create RTE component per component (cmsis would have own, rtos would have own) or we provide one as well for all cmsis components within Mbed OS (specific Mbed OS RTE component), something to look at (how it should be done - I believe it is this way in cmsis packs as well, there is one RTE component where you configure all packs - we can use it the same way).

Thanks, I have proposed the following ADR instead: #13464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants