zephyr: Cannot build applications with dts having (unused) external flash partition and disabling those drivers
Describe the bug
Seeing an issue with building mcuboot in zephyr whereby there is an external flash on QSPI which has a partition, lfs_partition, this partition is not used by mcuboot but the application fails to link unless the QSPI driver is enabled with an undefined reference to '__device_dts_ord_133' error, which is in default_flash_map. This leads to a complete waste of flash space by requiring completely unused flash drivers be enabled in builds.
If the lfs_parition part of the dts is commented out, the application builds without failing to link.
To Reproduce Build mcuboot (or any application with a flash driver) which has an unused flash partition in an external device and build it with the flash driver for that partition disabled.
Expected behavior Application to build without needing unused flash partition drivers
Impact Annoyance, waste of resources
Environment (please complete the following information):
- OS: Linux
- Toolchain: Zephyr SDK 0.14.2
- Commit SHA or Version used: 0baf45f00af7296caa089e02e75193ae4c2ae08c
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (4 by maintainers)
Commits related to this issue
- nvmp: a flash_map replacement flash_map is used by several subsystems to allow access to flash devices in a unified way. Flash_map is by design directed and limited towards flash devices and does not... — committed to Laczen/zephyr by Laczen 3 years ago
- flash_partitions: a flash_map alternative Working with partitions on a flash device has been done using the flash_map subsystem. The flash_map subsystem has been limiting (e.g. #52395) and does not s... — committed to Laczen/zephyr by Laczen 3 years ago
I did try this for a while and was not able to get it working, just tried it again and it is working so must have made a mistake previously.