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
#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
I also enabled the i2c in mcuboot overlay file
//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)>; }; };
and define i2c_dev in main.c as
const struct device *i2c_dev = DEVICE_DT_GET(DT_NODELABEL(i2c1));
but I am getting error
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
how to resolve this