Hello,
I'm using the nRF Connect SDK v1.9.0 and a nRF5340 on a custom board.
I want to use MCUBoot as a primary bootloader. On the development kit, the UART connecting the nRF5340 and the interface IC is UART_0. There the project central_bas worked fine.
Now I have a board were UART_0 from the nRF5340 is connected to another IC, and I only have access to UART_1 over some pin header.
Is it possible to route the input and output that MCUBoot and e.g. mcumgr usually send via UART_0 over UART_1?
I tried to set a <BOARD>.overlay file:
/ {
chosen {
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,uart-mcumgr = &uart1;
};
};
But this fails in linking with "undefined reference to uart1"
In the device.h file it says: If you get an error that looks like <tt>undefined reference to __device_dts_ord_<N></tt>, that is what happened. Check to make sure your device driver is being compiled, usually by enabling the Kconfig options it requires.
/** * @def DEVICE_DT_GET * * @brief Get a <tt>const struct device*</tt> from a devicetree node * identifier * * @details Returns a pointer to a device object created from a * devicetree node, if any device was allocated by a driver. * * If no such device was allocated, this will fail at linker time. If * you get an error that looks like <tt>undefined reference to * __device_dts_ord_<N></tt>, that is what happened. Check to make * sure your device driver is being compiled, usually by enabling the * Kconfig options it requires. * * @param node_id A devicetree node identifier * @return A pointer to the device object created for that node */ #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
What Kconfig is required to use UART_1 in this case?
Best regards,
Alex
prj.conf:
# # Copyright (c) 2019 Nordic Semiconductor ASA # # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause # CONFIG_NCS_SAMPLES_DEFAULTS=y CONFIG_BT=y CONFIG_BT_DEBUG_LOG=y CONFIG_BT_CENTRAL=y CONFIG_BT_SMP=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_GATT_DM=y CONFIG_HEAP_MEM_POOL_SIZE=1024 CONFIG_BT_BAS_CLIENT=y CONFIG_BT_SCAN=y CONFIG_BT_SCAN_FILTER_ENABLE=y CONFIG_BT_SCAN_UUID_CNT=1 CONFIG_BT_PRIVACY=y CONFIG_BT_SETTINGS=y CONFIG_FLASH=y CONFIG_FLASH_PAGE_LAYOUT=y CONFIG_FLASH_MAP=y CONFIG_NVS=y CONFIG_SETTINGS=y CONFIG_DK_LIBRARY=y # --- Adding MCUBoot --- # # Ensure an MCUboot-compatible binary is generated. CONFIG_BOOTLOADER_MCUBOOT=y CONFIG_MCUBOOT_IMAGE_VERSION="1.0.0+1" # maj.min.rev+build # Enable mcumgr. CONFIG_MCUMGR=y # Enable most core commands. CONFIG_MCUMGR_CMD_IMG_MGMT=y CONFIG_MCUMGR_CMD_OS_MGMT=y # Enable the serial mcumgr transport. CONFIG_MCUMGR_SMP_UART=y #CONFIG_MCUMGR_CMD_IMG_MGMT=y # Some command handlers require a large stack. Important for mcumgr, would otherwise timeout CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096