-
Notifications
You must be signed in to change notification settings - Fork 3k
Rename mbed_conf.h to mbed_config.h #1968
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
Conversation
@mbed-bot: TEST HOST_OSES=windows |
Merged build finished. No test results found. |
[Build 506] |
@mbed-bot: TEST HOST_OSES=windows |
Merged build finished. No test results found. |
[Build 507] |
Please read #1957 (comment), where it was proposed. I would go with the full name as here. cc @bogdanm |
Unfortunately we have used https://github.com/mbedmicro/mbed/blob/master/tools/toolchains/__init__.py#L501 I don't think this previous mechanism was ever really adopted by our users, but keeping it in place is the best option for backward compatibility, I think. |
Not sure this was ever documented as a feature, at least I cant find anything other than the commit message (and google confirms). I think this would be a safe change to revert given we now have a more complete and documented config system unless you know specifically of user projects using this mechanism. |
I don't know of any users of this, no. It was designed to be mbed's "equivalent" to autoconf's |
Hidden feature :-) Let's use
Does Config define a macro like
Any other use cases? |
Sure, but then let's also remove the previous logic related to
Not sure. Let's leave it out for now and add it later if needed. |
@@ -344,7 +344,7 @@ def get_symbols(self): | |||
|
|||
# Config support | |||
if self.has_config: | |||
self.symbols.append('HAVE_MBED_CONFIG_H') | |||
self.symbols.append('HAVE_MBED_CONFIG') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work, but looks confusing. You're still adding the HAVE_MBED_CONFIG
symbol,, even though the line that sets self.has_config
to True
was removed (below), so this code will never be executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was left so the config system can raise the flag. The user app can use the macro to "know" that configuration is in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But currently it doesn't, so I guess this is meant to be implemented later. In which case I'd leave a comment explaining this in the source, because otherwise we're likely to forget this later.
Now has_config is completely removed |
@mbed-bot: TEST HOST_OSES=windows |
[Build 517] |
Following the pattern device_has to DEVICE_, features to FEATURE_, the mbed config system should map to mbed_config.h
Following the pattern of "device_has" to "DEVICE_", "features" to "FEATURE_", the mbed config system should map to mbed_config.h