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

samples: code_relocation_nocopy: update macro to get flash size #87466

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

djiatsaf-st
Copy link
Collaborator

This PR brings changes to fix a regression introduced by this PR #76735 on the code_relocation_nocopy sample for stm32 boards.

The macro DT_REG_SIZE is now used instead of DT_REG_ADDR_BY_IDX to get a node's only register block size.

This PR will avoid the following CI failure :

[157/162] Linking C executable zephyr/zephyr_pre0.elf
../zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: invalid length for memory region EXTFLASH
[162/162] Linking C executable zephyr/zephyr.elf
../zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: invalid length for memory region EXTFLASH

The flash size is the second part (size) of the first reg value,

not the first part (address) of a nonexistent second reg value.

DT_REG_SIZE get a node's (only) register block size instead
DT_REG_ADDR_BY_IDX .

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
@kartben kartben added the platform: STM32 ST Micro STM32 label Mar 22, 2025
@kartben kartben merged commit 0e1ffc7 into zephyrproject-rtos:main Mar 25, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Samples Samples platform: STM32 ST Micro STM32
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants