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 

#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

Parents
  • Hello,

    The error message ''No prj.conf file(s) was found in the C:/gnodeBoot/sysbuild/mcuboot folder(s), please read the Zephyr documentation on application development'' means that you need to add a prjconf file in the systbuild/mcuboot directory which is missin now. Build system expects this project configuration.This is a requirement when using sysbuild with MCUboot, especially if you have board-specific configuration files or overlays in that directory.

    So try to do the following steps

    1. Create a file at C:/gnodeBoot/sysbuild/mcuboot/prj.conf.
    2. Copy the contents of the default MCUboot prj.conf (from the MCUboot source, typically found at bootloader/mcuboot/boot/zephyr/prj.conf in your NCS installation) into your new sysbuild/mcuboot/prj.conf
Reply
  • Hello,

    The error message ''No prj.conf file(s) was found in the C:/gnodeBoot/sysbuild/mcuboot folder(s), please read the Zephyr documentation on application development'' means that you need to add a prjconf file in the systbuild/mcuboot directory which is missin now. Build system expects this project configuration.This is a requirement when using sysbuild with MCUboot, especially if you have board-specific configuration files or overlays in that directory.

    So try to do the following steps

    1. Create a file at C:/gnodeBoot/sysbuild/mcuboot/prj.conf.
    2. Copy the contents of the default MCUboot prj.conf (from the MCUboot source, typically found at bootloader/mcuboot/boot/zephyr/prj.conf in your NCS installation) into your new sysbuild/mcuboot/prj.conf
Children
No Data
Related