Skip to content

[nrf fromlist] linker: Use zephyr,code-partition value #2979

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tomchy
Copy link
Contributor

@tomchy tomchy commented Jun 23, 2025

Enforce usage of values from devicetree if USE_DT_CODE_PARTITION Kconfig symbol is enabled.

Currently even if this symbol is enabled, the FLASH_LOAD_OFFSET value is used in the linker script.
The FLASH_LOAD_OFFSET symbol, even being promptless is such case, may be changed, leading to a very confusing situation, where devicetree
values have no effect on the build.

A good example of the build that wants to use exactly the same set of
configs, but a different link address is the A/B update scheme
(known ad Direct XIP in MCUboot), where the same application is linked to two different addresses.
If the source of the address remains in the Kconifg, the current approach forces a usage of two different configurations.

Upstream PR #: 91591

Enforce usage of values from devicetree if USE_DT_CODE_PARTITION Kconfig
symbol is enabled.

Currently even if this symbol is enabled, the FLASH_LOAD_OFFSET value
is used in the linker script.
The FLASH_LOAD_OFFSET symbol, even being promptless is such case,
may be changed, leading to a very confusing situation, where devicetree
 values have no effect on the build.

A good example of the build that wants to use exactly the same set of
 configs, but a different link address is the A/B update scheme
(known ad Direct XIP in MCUboot), where the same application is linked
to two different addresses.
If the source of the address remains in the Kconifg, the current approach
forces a usage of two different configurations.

Upstream PR #: 91591

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
Copy link

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.

1 participant