I2c configuration In MCUboot

I'm working on a custom board based on the nRF5340. On this board, the UART output (connected to an RS232 transceiver) is gated through an I/O expander which is controlled via I2C. This means the RS232 driver is only enabled after the application configures the I/O expander to turn it on now I want to turn it on in mcuboot and tried modifying the mcuboot application as bellow.

I tried configuring the i2c in mcuboot.conf 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
#mcuboot.conf
CONFIG_LOG=y
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
# CONFIG_MCUBOOT_SERIAL=y
# CONFIG_BOOT_SERIAL_UART=y
CONFIG_UART_CONSOLE=n
CONFIG_MCUBOOT_INDICATION_LED=y
CONFIG_FW_INFO_FIRMWARE_VERSION=3
CONFIG_MCUBOOT_LOG_LEVEL_INF=y
#CONFIG_SERIAL=n
CONFIG_GPIO=y
CONFIG_I2C=y
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


I also enabled the i2c in mcuboot overlay file 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//mcuboot.overlay
&i2c1 {
status = "okay";
};
&i2c1_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 1, 2)>, <NRF_PSEL(TWIM_SCL, 1, 3)>;
};
};
&i2c1_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 1, 2)>, <NRF_PSEL(TWIM_SCL, 1, 3)>;
};
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


and define i2c_dev in main.c as 
Fullscreen
1
const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(i2c1));
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

but I am getting error 

Fullscreen
1
2
C:/ncs/v2.9.0/bootloader/mcuboot/boot/zephyr/main.c:31: undefined reference to `__device_dts_ord_105'
collect2.exe: error: ld returned 1 exit status
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


how to resolve this