Assertion during startup when declaring an uart in the device tree

We get the following assertion during startup if we include uart2 in the DTS.

*** Booting My Application v2.1.0-dev-ae1ee57f3906 ***
*** Using nRF Connect SDK v3.0.1-9eb5615da66b ***
*** Using Zephyr OS v4.0.99-77f865b8f8d0 ***
I: Starting bootloader
I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3
I: Boot source: none
I: Image index: 0, Swap type: none
I: Bootloader chainload address offset: 0x10000
I: Image version: v0.0.0
Assert:stdio_init,0x00000060e slot

We are creating the problem with a fresh copy of the Azure IoT hub sample on a nRF9151DK.

The Azure IoT hub sample will not link out of the box, there are unresolved externals. So first the following needs to be added to prj.conf

CONFIG_STREAM_FLASH=y
CONFIG_IMG_MANAGER=y

Then a running sample should be OK.

Now if the following is added to the device tree. I copied the nrf9151dk_ns board and renamed according to doc and then added to *_common.dtsi 

&uart2 {
   status = "okay";
   current-speed = <9600>;
   pinctrl-0 = <&uart_rs485_default>;
   pinctrl-1 = <&uart_rs485_sleep>;
   pinctrl-names = "default", "sleep";
   modbus0 {
        compatible = "zephyr,modbus-serial";
        status = "okay";
        de-gpios = < &gpio0 8 GPIO_ACTIVE_HIGH>;
    };      
};
We are uable to run the application after adding an uart.
Best guess it is related to TF-M, but I have now used a week without figuring out what need to be modified. I guess a single CONFIG ting will fix it but which?

I am getting quite desperate ;-)

Related