-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Config: fix bootloader config errors - propagate errors #12059
Conversation
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 |
There was a problem hiding this comment.
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.
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
@@ -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): |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
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 |
This change was proposed for 5.15rc2. I would like to not having to disable these targets ideally. |
Yes, but we come again to the pack manager issue... |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
So that device name is not in targets.json because the json file is outdated? Trying to understand what else we should fix. |
UNO failed, will fix in the morning |
372fe58
to
0a79d83
Compare
CI started |
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 |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
@JanneKiiskila this bugfix disables bootloader for few boards (were not functional before anyway). |
CI restarted |
@jeromecoutant - yes, can you please specify what you mean? CMSIS packs are updated separately to the |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
7d21d38
to
c7ec52a
Compare
Rebased, target should be fixed (I can't compile it locally, having py3 related issues somehow even in the virtualenv). |
CI started |
device_name is missing
An error to be fixed: tools.config.ConfigException: Missing a memory that is read, write in CMSIS Pack data
device_name is missing
device_name missing
device_name is missing
device_name is missing
device_name is missing
device_name is missing
This should be reverted once bootloader is supported.
b635c59
to
22ab94a
Compare
I rebased it to remove one merge commit, clean now CI started |
Test run: FAILEDSummary: 3 of 4 test jobs failed Failed test jobs:
|
Test run: FAILEDSummary: 1 of 4 test jobs failed Failed test jobs:
|
CI restarted |
@AnttiKauppila Can you review unittest failures here, are they also on master?
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. |
Test run: FAILEDSummary: 4 of 4 test jobs failed Failed test jobs:
|
PR to fix unittests here: #12073 |
Landed on master, restarting CI |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
@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. |
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
Test results
Reviewers