Skip to content

Commit 25b326b

Browse files
titouanckartben
authored andcommitted
flash: stm32h7x: fix implicit declaration for LL_GetFlashSize
Since #83114 was merged, I get twister errors unrelated to my pull requests for the STM32H7S78-DK (for example https://github.com/zephyrproject-rtos/zephyr/actions/runs/14900504138/job/41851537049#step:12:1369) This is because the function LL_GetFlashSize() was removed from hal_stm32 on the STM32H7RS series in zephyrproject-rtos/hal_stm32@e5eba65 I am unsure if the removal from hal_stm32 is intentional. If yes, then this commit should be merged into Zephyr to fix compilation for that target. Otherwise, hal_stm32 must be patched, Zephyr's west manifest updated, and this commit can be discarded. Signed-off-by: Titouan Christophe <titouan.christophe@mind.be>
1 parent 6da50c3 commit 25b326b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/flash/flash_stm32h7x.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,7 @@ static const struct flash_parameters *flash_stm32h7_get_parameters(const struct
836836
return &flash_stm32h7_parameters;
837837
}
838838

839+
#ifndef CONFIG_SOC_SERIES_STM32H7RSX
839840
/* Gives the total logical device size in bytes and return 0. */
840841
static int flash_stm32h7_get_size(const struct device *dev, uint64_t *size)
841842
{
@@ -845,6 +846,7 @@ static int flash_stm32h7_get_size(const struct device *dev, uint64_t *size)
845846

846847
return 0;
847848
}
849+
#endif /* !CONFIG_SOC_SERIES_STM32H7RSX */
848850

849851
void flash_stm32_page_layout(const struct device *dev, const struct flash_pages_layout **layout,
850852
size_t *layout_size)
@@ -903,7 +905,9 @@ static DEVICE_API(flash, flash_stm32h7_api) = {
903905
.write = flash_stm32h7_write,
904906
.read = flash_stm32h7_read,
905907
.get_parameters = flash_stm32h7_get_parameters,
908+
#ifndef CONFIG_SOC_SERIES_STM32H7RSX
906909
.get_size = flash_stm32h7_get_size,
910+
#endif
907911
#ifdef CONFIG_FLASH_PAGE_LAYOUT
908912
.page_layout = flash_stm32_page_layout,
909913
#endif

0 commit comments

Comments
 (0)