Hello,
for my project I need a secondary image for McuBoot on an external flash drive, so I integrated the examples in the partitions.yml, the device tree and SPI NOR configuration. With the generic spi_nor driver it compiled fine. The SPI flash we need to use in our project because of the low power requirements is not entirely compatible with this, as the commands and write-protect handling is fairly different. So I adapted the spi_nor driver for my specific use and gave it a new id: 'renesas,at25pe80'. I added this in the device tree as well.
But now it does not build anymore, it does not get to the compiling stage even:
warning: SPI_NOR (defined at drivers/flash/Kconfig.nor:4) was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: DT_HAS_JEDEC_SPI_NOR_ENABLED (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SPI_NOR and/or look up SPI_NOR in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too. warning: SPI_NOR_FLASH_LAYOUT_PAGE_SIZE (defined at drivers/flash/Kconfig.nor:56) was assigned the value '4096' but got the value ''. Check these unsatisfied dependencies: SPI_NOR (=n). See http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SPI_NOR_FLASH_LAYOUT_PAGE_SIZE and/or look up SPI_NOR_FLASH_LAYOUT_PAGE_SIZE in the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.
The first error, that DT_HAS_JEDEC_SPI_NOR_ENABLED is set to no is the culprit, the error with SPI_NOR_FLASH_LAYOUT_PAGE_SIZE is just the result of the first error.
I have attached my driver and the DeviceTree and Config generated for the build. Maybe someone can find the error.
DT_HAS_JEDEC_SPI_NOR_ENABLED is not documented anywhere, so I cannot find help in official sources.
Thanks,
Rico