Skip to content

Conversation

multiplemonomials
Copy link
Collaborator

Summary of changes

This MR adds a feature for users to disable files that are part of one of the MCU targets (e.g. mbed-stm32l4 or mbed-stm32l452xe. It's as simple as:

mbed_disable_mcu_target_file(mbed-stm32l452xe system_clock.c)

Then, you can add your own system_clock.c as part of a custom target. No fuss, no muss!

Impact of changes

It's now possible to replicate the 'override' functionality that custom targets had in Mbed CLI 1 and mbed-cmake!

Migration actions required

None

Documentation

This is documented through the mbed-ce-custom-targets example project.


Pull request type

[] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[X] 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)
[X] Tests / results supplied as part of this PR

I tested this locally by confirming that the L452RE_CUSTOM_CLOCK target builds in the example repo, and system_clock.c from Mbed is not compiled as part of it.


Reviewers


@JojoS62
Copy link

JojoS62 commented Nov 29, 2022

good idea, only the file compare shows 'no newline at end of file'

@multiplemonomials
Copy link
Collaborator Author

Hmm, I think it didn't have one before either. Is having an ending newline a requirement? I don't think it has to be?

@multiplemonomials
Copy link
Collaborator Author

@JojoS62 @JohnK1987 did you have a chance to review this?

@multiplemonomials multiplemonomials merged commit 5f30094 into master Dec 3, 2022
@multiplemonomials multiplemonomials deleted the dev/enable-disabling-files branch December 3, 2022 04:32
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