Skip to content

Restored mbed target --supported behavior #572

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 4 commits into from
Dec 8, 2017
Merged

Restored mbed target --supported behavior #572

merged 4 commits into from
Dec 8, 2017

Conversation

cmonr
Copy link
Contributor

@cmonr cmonr commented Dec 1, 2017

Issue reference: #557

theotherjimmy
theotherjimmy previously approved these changes Dec 1, 2017
@screamerbg
Copy link
Contributor

screamerbg commented Dec 3, 2017

The underlying problem is the introduction of the matrix parameter, which breaks for older releases of Mbed OS (5.1-5.4.7), basically all releases since July 2016 til July 2017. See #575.

This PR doesn't fix it (rather makes it worse). Appropriate fix should revert the matrix behavior introduced in #460 which breaks backwards compatiblity. Notice that make.py doesn't require the matrix param in mbed-os-5.5, therefore this looks like a safe approach

/tmp/1/test-program:$ mbed update mbed-os-5.5.7
/tmp/1/test-program:$ /usr/bin/python -u /private/tmp/1/test-program/mbed-os/tools/make.py -S 
+----------------------+-----------+-----------+-----------+-----------+-----------+
| Target               | mbed OS 2 | mbed OS 5 |    ARM    |  GCC_ARM  |    IAR    |
+----------------------+-----------+-----------+-----------+-----------+-----------+
| ARCH_PRO             | Supported | Supported | Supported | Supported | Supported |
+----------------------+-----------+-----------+-----------+-----------+-----------+

[snip]

Supported targets: 92

@theotherjimmy
Copy link
Contributor

@cmonr @screamerbg We may be able to solve this by passing nothing when the argument to -S/--supported is "matrix", as this is the default, and the old behavior.

@theotherjimmy
Copy link
Contributor

@screamerbg Could you advise us on how to add a test that verifies that we do this in a backwards compatible way?

Copy link
Contributor

@screamerbg screamerbg left a comment

Choose a reason for hiding this comment

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

@cmonr could you change this PR so it removes "matrix" as a default argument passed to the underlying OS tools? Then align what's being passed through either mbed compile -S and mbed target -S. Does this make sense?

@screamerbg
Copy link
Contributor

screamerbg commented Dec 5, 2017

@cmonr Regarding how to test supported, perhaps check the circleCI file, and after mbed new . add something like
mbed target -S
mbed compile -S
mbed update mbed-os-5.5.1
mbed target -S
mbed compile -S
mbed update mbed-os-5.4.1
mbed target -S
mbed compile -S
mbed update mbed-os-5.3.1
mbed target -S
mbed compile -S
mbed update mbed-os-5.2.1
mbed target -S
mbed compile -S
mbed update mbed-os-5.1.1
mbed target -S
mbed compile -S

@screamerbg
Copy link
Contributor

@theotherjimmy Perhaps the same test can be invoked for mbed export -S?

@cmonr
Copy link
Contributor Author

cmonr commented Dec 5, 2017

@screamerbg Well that's amusing. Regarding how to test, that's effectively what I'm doing right now, except I sped it up by having separate directories checked out to their appropriate versions.

@screamerbg
Copy link
Contributor

@cmonr No pretty but it would do the job. You can make it look neat if you iterate through mbed releases (once it lands to master), checkout every MINOR.1 release and run mbed compile -S, mbed export -S and mbed target -S

@cmonr
Copy link
Contributor Author

cmonr commented Dec 5, 2017

@screamerbg Any particular reason why MINOR.1 instead of MINOR.0? Just curious.

Performed manual tests on mbed-os-5.x.0 repos.
@cmonr
Copy link
Contributor Author

cmonr commented Dec 5, 2017

Don't merge yet until tests are written (tomorrow).

Tested using mbed compile -S, mbed target -S, mbed toolchain -S, and mbed export -S on mbed-os-5.x.0 versions, and latest version.

Looking for guidance from @mbartling on how to test for his features.

@screamerbg
Copy link
Contributor

@cmonr if I'm not mistaken, one of the very first versions of mbed OS had the exporters broken in the x.0 release.

@screamerbg
Copy link
Contributor

@cmonr Any update on this?

@cmonr
Copy link
Contributor Author

cmonr commented Dec 7, 2017

@screamerbg The tests have been added in. I didn't find any issues with exporting from 5.1.0 and up.

Copy link
Contributor

@screamerbg screamerbg left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @cmonr

@theotherjimmy theotherjimmy merged commit 578fa73 into ARMmbed:master Dec 8, 2017
@cmonr cmonr deleted the issue_557 branch December 8, 2017 16:50
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