Skip to content

Conversation

@djiatsaf-st
Copy link
Contributor

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 <[email protected]>
@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