Skip to content

How to check version of mbed-os at compile time? #3091

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
infinnovation-dev opened this issue Oct 20, 2016 · 2 comments
Closed

How to check version of mbed-os at compile time? #3091

infinnovation-dev opened this issue Oct 20, 2016 · 2 comments

Comments

@infinnovation-dev
Copy link
Contributor

infinnovation-dev commented Oct 20, 2016

Description

  • Type: Question

Question

Is there a way to check which version of mbed-os is present e.g. 5.1 versus 5.2? It would be nice if there were some macro such as MBED_VERSION to check against, but I don't see one.

I was trying to get some code to compile cleanly against both 5.1 and (release candidate) 5.2. In 5.2, some methods are deprecated, resulting in warnings, but the alternatives are not available in 5.1. For example Callback(func, arg) c.f. Callback(arg, func).

Sure, I can find some other shibboleth such as MBED_CONF_CORE_STDIO_BAUD_RATE (renamed to MBED_CONF_PLATFORM_STDIO_BAUD_RATE in 5.2) but that doesn't smell right.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 20, 2016

We provide mbed library macro for mbed 2. I think it would be nice to have a version in the code (x.y.z)

cc @sg-

@0xc0170
Copy link
Contributor

0xc0170 commented Nov 9, 2016

Fixed via #3207

@0xc0170 0xc0170 closed this as completed Nov 9, 2016
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

No branches or pull requests

2 participants