-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Added warning if missing pm_static.yml when using single bootloader #10686
Added warning if missing pm_static.yml when using single bootloader #10686
Conversation
Thank you for your contribution! Note: This comment is automatically posted and updated by the Contribs GitHub Action. |
d9e345d
to
3be14b7
Compare
3be14b7
to
c573dcb
Compare
ec257a6
to
16177a0
Compare
16177a0
to
ea57327
Compare
Test specificationCI/Jenkins/NRF
CI/Jenkins/integration
All integration tests: null Detailed information of selected test modules Note: This message is automatically posted and updated by the CI |
ea57327
to
9e56268
Compare
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
It is just review missing on this PR right? |
cmake/partition_manager.cmake
Outdated
--- WARNING: Using a single bootloader without pm_static.yml. --- | ||
--- Static partitioning requires using a single bootloader when --- | ||
--- releasing firmware. Only use dynamic during development. --- |
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 don't get it. Isn't it just as problematic having two bootloaders without a static configuration? You need to statically define the size of the first non-upgradeable bootloader in both cases, to avoid run-time issues when programming the updateable bootloader and/or application.
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.
Ah right.
Yes I agree, the non-upgradable parts should be static, also for two bootloaders.
Should I expand this warning to all build with bootloaders then?
(And rephrase it)
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.
Yes I would suggest that we do that. The docs covers the other configurations (for example if you have a statically placed file system), and its not trivial to check that in build time through kconfig.
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 changed the check and text now.
What do you think?
(also misclicked resolve)
9e56268
to
c09b577
Compare
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.
Look good. I would, however, consider changing the comment we have now. It provides details relevant for the user, but its hidden in a source file which I guess people won't feel a need to inspect due to the verbosity of the warning message. Its just a nit so feel free to keep it, merge its content to the warning message or simply remove it (especially if you feel that the information it gives is present in the docs pointed to by the warning message).
c6d742d
to
9138b8e
Compare
I agree that the comment is redundant now that I refer to the docs in the warning. |
9138b8e
to
6a6ab90
Compare
97afa58
to
2a7f335
Compare
cmake/partition_manager.cmake
Outdated
# From Documentation: By default, the Partition Manager dynamically | ||
# places the partitions in memory. However, if you have a deployed | ||
# product that consists of multiple images, where only a subset of | ||
# the included images can be upgraded through a firmware update | ||
# mechanism, the upgradable images must be statically configured. | ||
if (NOT static_configuration AND | ||
(CONFIG_BOOTLOADER_MCUBOOT OR CONFIG_SECURE_BOOT)) | ||
message(WARNING " | ||
--------------------------------------------------------------------- | ||
--- WARNING: Using a bootloader without pm_static.yml. --- | ||
--- Static partitioning is required for non-upgradable partitions.--- | ||
--- See Partition Manager docs on Static Configuration for more --- | ||
--- info. --- | ||
--------------------------------------------------------------------- | ||
\n" | ||
) |
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.
Comment and message are opposed, and message is actually wrong
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.
Good point
However, changing it to just
Static partitioning is required for non-upgradable partitions.
is neither correct, as it can be done with dual bootloaders.
How about making it more generic?
Static partitioning is required for certain bootloader configurations. Check Partition Manager docs on Static Configuration to see if this applies to you.
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.
Or possibly Static partitioning is required when using a non-upgradable bootloader.
?
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 like the last sentence
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.
Static partitioning is required when using a non-upgradable bootloader.
Is confusing, it would be better to just link to or quote the documentation as it is on https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html#static-configuration
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.
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.
That looks great!
Should we add a link to docs instead of just reffering them by name? |
2a7f335
to
a5eab2a
Compare
Add a warning message if static configuration is missing when building with a single bootloader. Ref.: NCSIDB-942 Signed-off-by: Sigurd Hellesvik <[email protected]>
a5eab2a
to
ba3f950
Compare
From Partition Manager docs:
This PR gives a build warning, so users who miss this documentation will also know about this limitation.
Fixes NCSIDB-942