Skip to content
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

eclipse_gcc_arm export improvement #10295

Merged
merged 3 commits into from Apr 4, 2019

Conversation

Projects
None yet
6 participants
@AndriiLishchynskyi
Copy link
Contributor

commented Apr 2, 2019

Description

Current implementation of cdt exporter requires modification of cdt_definitions.json in order to support launch configuration for new kit (double-core). Usually launch configuration does not change if devices are derived from the same family. This pull request reduces maintenance burden of new kits support by allowing them to be based on extra_labels and not necessarily defined for each kit separately.

Also this pull request fixes:

  • unnecessary deepcopy introduced in previous my pull request: #9342
  • cdt_definitions.json clean-up
  • code style issues detected with pylint

All internal tests are passed

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[X] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@theotherjimmy

Release Notes

@ciarmcom ciarmcom requested review from theotherjimmy and ARMmbed/mbed-os-maintainers Apr 2, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Apr 2, 2019

if configuration in target_specific[tgt.name]:
eclipse_config.update(target_specific[tgt.name][configuration])
aliases = self.toolchain.target.resolution_order_names \
+ self.toolchain.target.extra_labels

This comment has been minimized.

Copy link
@theotherjimmy

theotherjimmy Apr 2, 2019

Contributor

How is this different from self.toolchain.target.labels? Is that something that you could use instead?

This comment has been minimized.

Copy link
@AndriiLishchynskyi

AndriiLishchynskyi Apr 3, 2019

Author Contributor

It is different a bit, but it is also ok, so I switched to self.toolchain.target.labels

if target_alias:
eclipse_config.update(target_specific[target_alias]['generic'])
if configuration in target_specific[target_alias]:
eclipse_config.update(target_specific[target_alias][configuration])

This comment has been minimized.

Copy link
@theotherjimmy

theotherjimmy Apr 2, 2019

Contributor

I would write this differently, as I generally avoid using the next function:

for target_alias in aliases:
    if target_alias in target_specific:
        eclipse_config.update(target_specific[target_alias]['generic'])
        if configuration in target_specific[target_alias]:
            eclipse_config.update(target_specific[target_alias][configuration])
        return eclipse_config

This comment has been minimized.

Copy link
@AndriiLishchynskyi

AndriiLishchynskyi Apr 3, 2019

Author Contributor

Applied your fix, thanks.

This comment has been minimized.

Copy link
@theotherjimmy

theotherjimmy Apr 3, 2019

Contributor

You dropped (or mis-indented) the return, which makes the code apply all possible target specific settings from most specific to least specific, as opposed to what it used to do which is apply the first match or most specific match.

This comment has been minimized.

Copy link
@AndriiLishchynskyi

AndriiLishchynskyi Apr 3, 2019

Author Contributor

Missed that. I added a break instead of return, because we still have to return defaults, even if specific settings does not exist.

@0xc0170

0xc0170 approved these changes Apr 4, 2019

@0xc0170

This comment has been minimized.

Copy link
Member

commented Apr 4, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

commented Apr 4, 2019

Test run: SUCCESS

Summary: 13 of 13 test jobs passed
Build number : 1
Build artifacts

@0xc0170 0xc0170 added ready for merge and removed needs: CI labels Apr 4, 2019

@0xc0170 0xc0170 merged commit 06b60e3 into ARMmbed:master Apr 4, 2019

28 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 10236 cycles (+1019 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@0xc0170 0xc0170 removed the ready for merge label Apr 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.