Set default stdio-baud-rate for all targets#934
Set default stdio-baud-rate for all targets#934MarceloSalazar wants to merge 1 commit intoARMmbed:masterfrom MarceloSalazar:default-serial-fix
Conversation
When creating a new Mbed OS program, for some reason the default baud rate is set only for K64F. However, we should be having a generic configuration for all platforms, hence the proposed change.
| # Default data content | ||
| if not os.path.exists(mbed_app_file_name): | ||
| data = {'target_overrides':{'K64F':{'platform.stdio-baud-rate': 9600}}} | ||
| data = {'target_overrides':{'*':{'platform.stdio-baud-rate': 9600}}} |
There was a problem hiding this comment.
I don't think this is needed as the default is defined here https://github.com/ARMmbed/mbed-os/blob/7a085b472b8b0b31755732fe79d9fc54a1c20c20/platform/mbed_lib.json#L24
It would also override other target specific definitions with this app config. However, I'm not sure what the K64F is here at all, perhaps as an example?
Is there a problem you are trying to solve?
There was a problem hiding this comment.
The tools should be platform agnostic.
At the moment, if you just run mbed new test and see the mbed_app.json generated inside the project, you'll see:
"target_overrides": {
"K64F": {
"platform.stdio-baud-rate": 9600
}
This is for no good reason creating a configuration for the K64F but many other times I just want to use other platforms.
This PR is just replacing K64F to * to be agnostic and apply the same default-configuration to all platforms.
There was a problem hiding this comment.
As it stand the K64F is a strange additional but I'd rather see it removed than making it apply to all platforms.
There was a problem hiding this comment.
Ok, shall we remove the whole line?
When creating a new Mbed OS program, for some reason the default baud rate is set only for K64F.
However, we should be having a generic configuration for all platforms, hence the proposed change.
@mark-edgeworth