partition_manager incorrectly identifies qspi use for external flash

This question is in lieu of an issue on the repository, because I don't think issues are accepted there?

I noticed I was getting the following CMake Warning:

Could not find memory mapped address for XIP. Generated update hex files
will not have the correct base address. Hence they can not be programmed
directly to the external flash

Turns out XIP is not relevant, because the QSPI interface for our nrf5340 is already in use for the nrf7002, as is common. Thus our external flash is connected to SPI, and so the XIP feature of QSPI cannot be used. The misleading warning seems to occur because the external flash node is incorrectly identified as a QSPI node.

Specifically, this line sets a variable called qspi_node which is assumed to be the external flash QSPI node, triggering the false warning. The assumption seems to first get off track on line 487, which assumes if external flash is in use for the mcuboot secondary, and the design has QSPI capability, then external flash is connected to QSPI. A number of incorrect assumptions then follow.

https://github.com/nrfconnect/sdk-nrf/blob/44120b0f42fac03176aafd36d72f54767f144945/cmake/partition_manager.cmake#L489

Related