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

Begin documenting Mbed OS target features and components #240

Merged
merged 6 commits into from
Feb 9, 2024

Conversation

multiplemonomials
Copy link
Collaborator

@multiplemonomials multiplemonomials commented Feb 6, 2024

Summary of changes

As part of the testing effort, I'd like to make a dashboard showing all the COMPONENTs, FEATUREs, and TARGET_ defines present in Mbed, so we can see what devices they're enabled on and such. But I realized, before we can do that, we need to actually have an agreed upon idea of what some of these features and components actually are. I think that these have grown rather organically over the years, with vendors not quite sure whether to add something as a component, a macro, or a device_has entry. In this PR, I try to document them in a new features.json file and clean up some of the incorrectly created ones.

I only got through about half the components, but this PR was so large that I figured I'd submit it here and let y'all review. More will be coming after this!

Probably the biggest single change in this PR was hiding all of the cellular drivers behind new COMPONENT_ labels. The COMPONENT system is created to do exactly this -- it's supposed to be a way to enable drivers specifically for one target without making them compile for every Mbed board. However, for whatever weird reason, the cellular drivers weren't using components, so every single build of Mbed sees the gemalto, quectel, telit, etc drivers be compiled. It's a waste of compile time and these should be taken out of the standard build.

Other changes include:

  • Removed quite a few components that Cypress accidentally added because of defines that started with "COMPONENT" in their SDK
  • Fixed bugs where boards with onboard cellular modems would not have the cellular modems available because the files were not linked to the mbed-cellular target, so the CELLULAR_PRESENT define would always be undefined. To fix this, I moved all the onboard modem definition files to be part of mbed-cellular for the correct targets.
  • Fixed bug where 802.15.4 drivers were not enabled because mbed-rtos-flags was not linked in to their CMake target
  • DEVICE_ETHERNET, SYSTICK_CLK_OFF_DURING_SLEEP, and DEVICE_STDIO_MESSAGES features have been removed as they seemed to do nothing in the code.
  • Make some notes about targets which seem like "candidates for removal" -- where there's no problem with the target in the code, but the hardware it's supporting has gone the way of the dodo. It seems like the 3G cellular boards, in particular, are nearly all end of life and impossible to buy.
  • Removed the U-Blox cellular drivers. Three reasons:
    • The targets which used these drivers (UBLOX_C027, UBLOX_C030) have been gone from Mbed since 6.0.0
    • The drivers are quite badly organized and it was very difficult for me to sort out which code files were for which ublox modems (there is code for 4 different modems all munged together in the same file)
    • The modems themselves mostly seem to be end-of-life. I didn't check every single one, but most of them seem unbuyable and/or marked as obsolete.

When reviewing this code, I'd mainly focus on the targets.json5 and features.json5 changes as those are the meat of this PR. The other changes/renames are just to support those and remove unnneeded stuff from the build.

Impact of changes

  • Cellular and 802.15.4 drivers have been hidden behind COMPONENTs (e.g. COMPONENT_RIOTMICRO_RM1000, COMPONENT_MICROCHIP_AT86RF) and will not be available to applications unless these components are enabled in mbed_app.json
  • U-Blox cellular drivers removed
  • LocalFileSystem is now a component instead of a feature. It is still available on Mbed LPC1768 boards by default.
  • semihosting is now a target option instead of a feature. It can be enabled on any target via "target.semihosting-enabled": true in the mbed_app.json overrides section

Migration actions required

Documentation

This actually adds new documentation!


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[X] 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

Ultimately it's going to be tough to test this one as we don't have CI builds for most of these boards. I did test MTS_DRAGONFLY_L496VG and it builds OK.


Reviewers


@multiplemonomials
Copy link
Collaborator Author

@JohnK1987 does this look OK? I know it's a big one so it's OK if ya need some time

@multiplemonomials multiplemonomials merged commit f19273a into master Feb 9, 2024
9 checks passed
@multiplemonomials multiplemonomials deleted the dev/document-features-and-components branch February 9, 2024 06:46
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.

2 participants