Describe the bug
I have a board that has the usual ST's internal flash, and an external SPI NOR one. I want to utilize both flashes in the context of an application. The https://github.com/zephyrproject-rtos/zephyr/commit/7d428bb0a8d35e1198068dff14e47853240f3ee5 introduced the CONFIG_FLASH_SIZE which is also produced for the internal flashes in generated header.
On my local copy, I've overcome this by renaming it to CONFIG_SPI_NOR_SIZE and resolved my issues.
To Reproduce
I've observed it when my memcheck program could not access all the sectors of the external (significantly bigger) SPI NOR flash.
Expected behavior
I expect to have the ability to include an external SPI NOR flash along with the internal.
Additional context
If the used workaround is OK, then ping me to make a fix of it.
IMO The right fix is to complete moving the SPI drivers to device tree, and specify flash size and other properties in the DTS node. I know @galak has been moving that direction; so had I specifically for spi-nor but now I'm waiting for the dust to settle. We also need to get the jedec,spi-nor compatible yaml in place, and figure out whether we need so many spi nor driver implementations.
@pabigot and @findlayfeng have done some changes around this which has already been committed to the main tree. @gon1332 Can you please check if your requirements are addressed now?
Most helpful comment
IMO The right fix is to complete moving the SPI drivers to device tree, and specify flash size and other properties in the DTS node. I know @galak has been moving that direction; so had I specifically for
spi-norbut now I'm waiting for the dust to settle. We also need to get thejedec,spi-norcompatible yaml in place, and figure out whether we need so many spi nor driver implementations.