Skip to content

Separate version header file in Mbed OS #7434

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

Merged
merged 1 commit into from
Jul 13, 2018

Conversation

deepikabhavnani
Copy link

@deepikabhavnani deepikabhavnani commented Jul 6, 2018

Description

Separate version header file to have version details in Mbed OS source.
Update System stats to fetch Mbed OS version.

Pull request type

[ ] Fix
[x] Refactor
[ ] New target
[ ] Feature
[ ] Breaking change

CC @adbridge @bulislaw

@adbridge
Copy link
Contributor

adbridge commented Jul 6, 2018

@deepikabhavnani These are 2 separate changes, albeit related. Please split into 2 PRs.

@deepikabhavnani deepikabhavnani changed the title Add version header file and update system stats Separate version header file to have version details in Mbed OS source. Jul 6, 2018
@deepikabhavnani deepikabhavnani changed the title Separate version header file to have version details in Mbed OS source. Separate version header file in Mbed OS Jul 6, 2018
Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good, however when referencing macro parameters they should always have ( ) around them:
MBED_STATIC_ASSERT((MBED_VERSION >= MBED_ENCODE_VERSION(M,m,p))

M, m and p should be (M), (m) and (p)

@deepikabhavnani
Copy link
Author

deepikabhavnani commented Jul 6, 2018

M, m and p should be (M), (m) and (p)

👍 Done

@deepikabhavnani
Copy link
Author

Related: #4891

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 9, 2018

151515

Why was this number chosen for master? we might get there one day or not?

👍 for having separate version header file

@deepikabhavnani
Copy link
Author

deepikabhavnani commented Jul 9, 2018

Why was this number chosen for master? we might get there one day or not?

We didn;t wanted default to be zero or empty defines, hence 0xF. But now I feel we can have it as 999999 as well..
@adbridge @0xc0170 - 999999 as default for master branch will be good?

@adbridge
Copy link
Contributor

adbridge commented Jul 9, 2018

I'd be surprised if we ever get to a major version of 15 considering the major (no pun intended) changes involved in bumping that field! Though the actual number is irrelevant really. Perhaps 999999 might be better...

@deepikabhavnani
Copy link
Author

Changed default version to 999999

@adbridge
Copy link
Contributor

LGTM

@0xc0170 0xc0170 requested a review from bulislaw July 10, 2018 14:48
@cmonr
Copy link
Contributor

cmonr commented Jul 11, 2018

@bulislaw @kjbracey-arm Thoughts?

* @note: Version of master branch will be 999999 as default, hence no assert/warning is provided for
* master branch code
*/
#define MBED_VERSION_CHECK(M,m,p) do { \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change the parameters to full spelled out version lik in MBED_ENCODE_VERSION

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 12, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Jul 12, 2018

Build : SUCCESS

Build number : 2582
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7434/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Jul 12, 2018

@mbed-ci
Copy link

mbed-ci commented Jul 12, 2018

@cmonr cmonr merged commit 6fcb77e into ARMmbed:master Jul 13, 2018
@deepikabhavnani deepikabhavnani deleted the version_header branch July 13, 2018 17:59
@cmonr cmonr mentioned this pull request Aug 3, 2018
pan- pushed a commit to pan-/mbed that referenced this pull request Aug 22, 2018
Separate version header file in Mbed OS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants