Skip to content

boot: zephyr: boards: stm32: set configs for some boards #2407

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

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

Conversation

djiatsaf-st
Copy link

Deactivate CONFIG_BOOT_MAX_IMG_SECTORS_AUTO by setting it to n, and set CONFIG_BOOT_MAX_IMG_SECTORS to 256.

@djiatsaf-st djiatsaf-st marked this pull request as draft July 29, 2025 14:19
- Deactivate CONFIG_BOOT_MAX_IMG_SECTORS_AUTO
- set CONFIG_BOOT_MAX_IMG_SECTORS default value

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
@de-nordic de-nordic added area: zephyr Affects the Zephyr port STM Changes related to STM platforms labels Jul 29, 2025
@djiatsaf-st djiatsaf-st changed the title boot: zephyr: boards: set configs for nucleo_g071rb boot: zephyr: boards: stm32: set configs for some boards Jul 30, 2025
@@ -0,0 +1,2 @@
CONFIG_BOOT_MAX_IMG_SECTORS_AUTO=n
CONFIG_BOOT_MAX_IMG_SECTORS=256

Choose a reason for hiding this comment

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

This should not be needed, as it can be calculated automatically based on
https://github.com/zephyrproject-rtos/zephyr/blob/d53f324ca09dcafda0923a38f773b1538857f2f3/dts/arm/st/c0/stm32c0.dtsi#L150
and image size.

math(EXPR slot_min_sectors "${slot0_size} / ${erase_size_slot0}")

If it's not calculated properly when MAX_IMG_SECTORS_AUTO=y, the cause should be investigated, instead of patching the problem elsewhere which does not scale with the number of boards in Zephyr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: zephyr Affects the Zephyr port STM Changes related to STM platforms
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants