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

Most upvoted comments

@thedjnK, it is possible to remove the driver while building for mcuboot by supplying a dts overlay file that deletes the lfs-partition node.

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.