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

kconfig: Don't USE_DT_CODE_PARTITION if there isn't one #83877

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

57300
Copy link
Contributor

@57300 57300 commented Jan 13, 2025

Previously, if there was no zephyr,code-partition chosen DT node, then enabling CONFIG_USE_DT_CODE_PARTITION would make all of flash available to the linker, with no immediate indication of that to the user.

To avoid this discrepancy, make the USE_DT_CODE_PARTITION Kconfig symbol depend on that chosen node being present. For the sake of verbosity, add a dedicated symbol to describe this: HAS_DT_CODE_PARTITION.

An additional benefit is that certain platforms or applications can now use select USE_DT_CODE_PARTITION to signal zephyr,code-partition as a hard requirement, by failing the build whenever the node is missing.

@maass-hamburg
Copy link
Collaborator

CI probably fails, due to this commit missing: 1305a24 from #81276.

Feel free to cherry-pick it

@57300
Copy link
Contributor Author

57300 commented Jan 13, 2025

Thanks @maass-hamburg! I'll keep an eye on your PR, looks like it's close to being merged.

@maass-hamburg
Copy link
Collaborator

Rebase, after #83941 is fixed

@maass-hamburg maass-hamburg self-requested a review January 14, 2025 08:29
Previously, if there was no `zephyr,code-partition` chosen DT node, then
enabling CONFIG_USE_DT_CODE_PARTITION would make all of flash available
to the linker, with no immediate indication of that to the user.

To avoid this discrepancy, make the USE_DT_CODE_PARTITION Kconfig symbol
depend on that chosen node being present. For the sake of verbosity, add
a dedicated symbol to describe this: HAS_DT_CODE_PARTITION.

An additional benefit is that certain platforms or applications can now
use `select USE_DT_CODE_PARTITION` to signal `zephyr,code-partition` as
a hard requirement, by failing the build whenever the node is missing.

Signed-off-by: Grzegorz Swiderski <[email protected]>
@57300 57300 force-pushed the has-dt-code-partition branch from 8f89db7 to 00bb3ca Compare January 17, 2025 08:12
@kartben kartben merged commit 1440f5c into zephyrproject-rtos:main Jan 17, 2025
24 checks passed
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.

5 participants