Skip to content

Config: fix bootloader config errors - propagate errors #12059

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

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Dec 9, 2019

Summary of changes

See #12007, this fixes the config failures. Do not ignore all config failures

Impact of changes

Migration actions required

Documentation

Not needed


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[X] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 9, 2019

CI started

@@ -894,63 +894,56 @@ def _add_all_regions(self, region_list, active_region_name):
def add_regions(self):
"""Add regions to the build profile, if there are any.
"""

if not getattr(self.target, "bootloader_supported", False):
return
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the addition for #12007 . The rest was approved already.

@0xc0170 0xc0170 requested a review from a team December 9, 2019 13:56
@mbed-ci
Copy link

mbed-ci commented Dec 9, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@@ -894,63 +894,56 @@ def _add_all_regions(self, region_list, active_region_name):
def add_regions(self):
"""Add regions to the build profile, if there are any.
"""

if not getattr(self.target, "bootloader_supported", False):
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather encode the default behaviour in self.target rather than define the default here, other places where this is used may assume a different default. There is also a danger of typos using this technique that would not cause exceptions as if there is a typos the result is always False. Maybe these are relatively minor points but they do somewhat hinder maintainability so should be avoided in code we wish to maintain in the long term.

Copy link
Contributor Author

@0xc0170 0xc0170 Dec 9, 2019

Choose a reason for hiding this comment

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

This is how it is done in regions().
It should be done properly but I don't have entire picture how config works yet . I found this the easiest way to fix now (same check is used inside config but in the later phase when its too late to go back) and later to even rewrite this add_regions to catch errors better.

Do you suggest to have target method to return if bootloader is supported and add_regions() would not even be called if not?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 9, 2019

There are couple of errors in the targets - they define bootloader support but device_name is missing or target does not contain ROM information. I commited each target separately. Please review, it would be the best to have it enabled back.

Errors were previously silent, therefore this was not seen. You can review the logs in the last CI run above.

cc @ARMmbed/team-renesas @ARMmbed/team-st-mcd @ARMmbed/team-st-mcd

I'll run CI to test this

@0xc0170 0xc0170 requested review from a team December 9, 2019 16:36
@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 9, 2019

This change was proposed for 5.15rc2. I would like to not having to disable these targets ideally.

@jeromecoutant
Copy link
Collaborator

device_name is missing

Yes, but we come again to the pack manager issue...
You don't update the json file information with the latest available keil packages...

@mbed-ci
Copy link

mbed-ci commented Dec 9, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 9, 2019

You don't update the json file information with the latest available keil packages...

So that device name is not in targets.json because the json file is outdated? Trying to understand what else we should fix.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 9, 2019

UNO failed, will fix in the morning

@0xc0170 0xc0170 force-pushed the JammuKekkonen-remove_hiding_config_errors branch from 372fe58 to 0a79d83 Compare December 10, 2019 08:59
@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

CI started

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

Another bug in the tools (if a targes defines sectors, it tries to merge sectors but throwbacks as bootloader is not supported if it set to False).

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

@JanneKiiskila this bugfix disables bootloader for few boards (were not functional before anyway).

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

CI restarted

@JanneKiiskila
Copy link
Contributor

You don't update the json file information with the latest available keil packages...

So that device name is not in targets.json because the json file is outdated? Trying to understand what else we should fix.

@jeromecoutant - yes, can you please specify what you mean? CMSIS packs are updated separately to the index.json in the other folder. That, in itself, does not yield updates to the targets.json, someone has to do them manually, I think?

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 4
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170 0xc0170 force-pushed the JammuKekkonen-remove_hiding_config_errors branch from 7d21d38 to c7ec52a Compare December 10, 2019 11:31
@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

Rebased, target should be fixed (I can't compile it locally, having py3 related issues somehow even in the virtualenv).

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

CI started

@0xc0170 0xc0170 force-pushed the JammuKekkonen-remove_hiding_config_errors branch from b635c59 to 22ab94a Compare December 10, 2019 14:10
@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

I rebased it to remove one merge commit, clean now

CI started

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 6
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 7
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests

@adbridge
Copy link
Contributor

CI restarted

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

@AnttiKauppila Can you review unittest failures here, are they also on master?

[2019-12-10T15:10:58.238Z] CMakeFiles/features-cellular-framework-AT-at_cellularstack.dir/build.make:62: recipe for target 'CMakeFiles/features-cellular-framework-AT-at_cellularstack.dir/features/cellular/framework/AT/at_cellularstack/at_cellularstacktest.cpp.o' failed

This PR was OK until just 2 hours ago (prior merging feature cellular branch). I only added one target fix, rebased to latest master.

We haven't yet run any CI for other PRs.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

There were 2 PRs to master today (#12051 and #11996) touching unittests cellular.

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2019

Test run: FAILED

Summary: 4 of 4 test jobs failed
Build number : 8
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_unittests
  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@AnttiKauppila
Copy link

PR to fix unittests here: #12073

@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 10, 2019

PR to fix unittests here: #12073

Landed on master, restarting CI

@mbed-ci
Copy link

mbed-ci commented Dec 10, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 9
Build artifacts

@adbridge adbridge merged commit 0c227a0 into ARMmbed:master Dec 10, 2019
@0xc0170
Copy link
Contributor Author

0xc0170 commented Dec 11, 2019

@ARMmbed/team-cypress @ARMmbed/team-st-mcd @ARMmbed/team-renesas Please review what was disabled in this PR. These targets would be good to have re-enabled with fixing what caused the bootloader failures.

@0xc0170 0xc0170 deleted the JammuKekkonen-remove_hiding_config_errors branch December 11, 2019 11:11
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.

7 participants