Closed miggazElquez closed 3 months ago
Hi @miggazElquez! We appreciate you submitting your first issue for our open-source project. 🌟
Even though I'm a bot, I can assure you that the whole community is genuinely grateful for your time and effort. 🤖💙
Please use our bug template when reporting bugs. You need to edit this issue to include the information requested in https://github.com/zephyrproject-rtos/zephyr/blob/main/.github/ISSUE_TEMPLATE/001_bug_report.md (e.g. we have no indication of which revision of Zephyr, you are reporting this against).
Done
The Kconfig option
MEMC_STM32
is not set correctly:The option is defined in two files:
drivers/memc/Kconfig.stm32
, wich depends onMEMC
DT_HAS_ST_STM32_FMC_ENABLED
soc/st/stm32/Kconfig.defconfig
, wich depends onMEMC
SOC_FAMILY_STM32
So, if you have
CONFIG_MEMC=y
in your Kconfig options and you are on a STM32 SoC,CONFIG_MEMC_STM32
will be enabled, even if there is no STM32 FMC enabled.This Kconfig option causes the driver for the STM32 FMC to be compiled, regardless of the presence of an enabled node for the FMC. However, the driver fails to compile if there is no FMC node in the devicetree. So, if you compile a project with CONFIG_MEMC=y on a board with an STM32 SoC and no enabled FMC, the build will fail.
To Reproduce Add
CONFIG_MEMC=y
in an application. Build on for a board with a STM32 SoC without enabling the fmc The build failsExpected behavior It shouldn't try to compile the driver for the fmc, and the build should work.
Impact
Annoyance: when building the same project, I have to change the configuration depending on if I enable the fmc or not in the Device tree.
Logs and console output After adding
CONFIG_MEMC=y
to the sample blinky and runningwest build -p always -b stm32l562e_dk samples/basic/blinky
:Environment Os: Linux Toolchain: Zephyr SDK Commit SHA: a6e672f9b2368e6d011da189afd462fec599fd0d