BLE OTA DFU using external flash

I'm using the NCS 2.5.2 sdk and nrf 5340 with 7002, and I want to do BLE OTA DFU using external flash.

I've found this guide Add DFU support to your application - Software - nRF Connect SDK guides - Nordic DevZone (nordicsemi.com), and successfully  done BLE OTA DFU using internal flash, just add the commands below,

#Enable MCUBOOT bootloader build in the application
CONFIG_BOOTLOADER_MCUBOOT=y
#Include MCUMGR and the dependencies in the build
CONFIG_NCS_SAMPLE_MCUMGR_BT_OTA_DFU=y

but I don't know how to do with external flash, I've tried looking at main.c in mcuboot, and I didn't find where to modify the code.

Related