MCUBOOT not loging, serial DFU not compile

Hello,
I've been trying to get MCUboot running on my custom board with the nRF9160 for two days now, and I'm honestly at my wit's end. The main application is written and works perfectly — LTE, UART, SPI, everything runs as it should.

Now I wanted to add DFU over UART, but I just can't get it to work.

To simplify things, I'm using the Nordic Academy examples (l8_e1 and l9_e1). On the nRF9160DK, everything works flawlessly. But on my custom board, MCUboot doesn't work at all.

The board was generated automatically by nRF Connect.

Simply enabling MCUboot results in no MCUboot log output on boot. When I add the following configuration:

CONFIG_MCUBOOT_SERIAL=y  
CONFIG_BOOT_SERIAL_UART=y  

the build fails with an error: pm_config: No such file or directory

For now, I just want to get MCUboot logging working.

sysbuil.conf:

SB_CONFIG_BOOTLOADER_MCUBOOT=y

mcuboot.conf:

CONFIG_SERIAL=y

dts:

/ {
	chosen {
		zephyr,flash = &flash0;
		zephyr,sram = &sram0_ns;
		zephyr,code-partition = &slot0_ns_partition;
		zephyr,console = &uart0;
		zephyr,shell-uart = &uart0;
		zephyr,uart-mcumgr = &uart0;
	};

defconfig (board)

CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y

CONFIG_ARM_TRUSTZONE_M=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y

#dodane:

# Enable RTT
CONFIG_USE_SEGGER_RTT=y
# Enable PINCTRL
CONFIG_PINCTRL=y

# Enable GPIO
CONFIG_GPIO=y

# Enable UARTE
CONFIG_SERIAL=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

Copilot or GPT can't solve the problem.

In the memory report preview, I see the same partitions as those generated by the nRF9160DK board.

A simple task, and I’m already fed up with this system:(

Thank you for your responses. Best regards!

Parents
  • Hello,

    When you include MCUboot in your build (SB_CONFIG_BOOTLOADER_MCUBOOT=y) without adding any configuration overlays in your mcuboot.conf, what happens? Does the bootloader fail to boot the application? Do you see any build errors or warnings?

    Best regards,

    Vidar

  • Problem solved – it turned out that mcuboot is being compiled using:
    Plytka_IOT_V1.dts and Plytka_IOT_V1_defconfig.
    These files were almost empty because I was compiling my projects using:
    Plytka_IOT_V1_ns.dts and Plytka_IOT_V1_ns_defconfig.

    After some experimentation (with help from ChatGPT), I figured out that mcuboot uses different files for compilation than the non secure version.

    It took me almost 3 days Cry. We eventually realized that the more data we added to mcuboot.overlay, the more things started to work.

    Cheers!

Reply
  • Problem solved – it turned out that mcuboot is being compiled using:
    Plytka_IOT_V1.dts and Plytka_IOT_V1_defconfig.
    These files were almost empty because I was compiling my projects using:
    Plytka_IOT_V1_ns.dts and Plytka_IOT_V1_ns_defconfig.

    After some experimentation (with help from ChatGPT), I figured out that mcuboot uses different files for compilation than the non secure version.

    It took me almost 3 days Cry. We eventually realized that the more data we added to mcuboot.overlay, the more things started to work.

    Cheers!

Children
Related