sysbuild/DFU OTA build error: undefined reference to '__device_dts_ord_116'

Hi,

I'd like to raise this issue I am having with the v3.0.1 sdk wherein the final build stages I get the message attached 

FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map <path>/zephyr_pre0.map
cmd.exe /C "cd . && <toolchain path>/arm-zephyr-eabi-gcc.exe -gdwarf-4 \
zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj \
-o zephyr/zephyr_pre0.elf \
zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj \
-T zephyr/linker_zephyr_pre0.cmd \
-Wl,-Map=<path>/zephyr_pre0.map \
-Wl,--whole-archive app/libapp.a zephyr/libzephyr.a ... \
-Wl,--no-whole-archive zephyr/kernel/libkernel.a \
-L<build path> -lgcc && \
cmd.exe /C "cd /D <path>/mcuboot/zephyr && cmake -E true""

ld.bfd.exe: zephyr/drivers/flash/libdrivers__flash.a(spi_nor.c.obj): \
(.rodata.spi_nor_0_config+0x0): undefined reference to `__device_dts_ord_116'

collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

If anybody has advice for this issue, that would be greatly appreciated. 

Thanks!

Parents Reply Children
  • Yes I have

    From devicetree_generated.h:

    /* Node's dependency ordinal: */
    #define DT_N_S_soc_S_peripheral_50000000_S_uart_4a000_ORD 116
    #define DT_N_S_soc_S_peripheral_50000000_S_uart_4a000_ORD_STR_SORTABLE 00116

    	115, /* /soc/peripheral@50000000/timer@ce000 */ \
    	116, /* /soc/peripheral@50000000/uart@4a000 */ \
    	117, /* /soc/peripheral@50000000/uart@c6000 */

    /* Ordinals for what depends directly on this node: */
    #define DT_N_S_clocks_S_hfpll_SUPPORTS_ORDS \
    	26, /* /cpus/cpu@0 */ \
    	108, /* /soc/peripheral@50000000/timer@55000 */ \
    	116, /* /soc/peripheral@50000000/uart@4a000 */

    From nrf54l15_05_10_15.dtsi

    spi00: spi@4a000 {
    				/*
    				 * This spi node can be either SPIM or SPIS,
    				 * for the user to pick:
    				 * compatible = "nordic,nrf-spim" or
    				 *              "nordic,nrf-spis".
    				 */
    				compatible = "nordic,nrf-spim";
    				#address-cells = <1>;
    				#size-cells = <0>;
    				reg = <0x4a000 0x1000>;
    				interrupts = <74 NRF_DEFAULT_IRQ_PRIORITY>;
    				max-frequency = <DT_FREQ_M(32)>;
    				easydma-maxcnt-bits = <16>;
    				rx-delay-supported;
    				rx-delay = <1>;
    				status = "disabled";
    			};
    
    			uart00: uart@4a000 {
    				compatible = "nordic,nrf-uarte";
    				reg = <0x4a000 0x1000>;
    				interrupts = <74 NRF_DEFAULT_IRQ_PRIORITY>;
    				clocks = <&hfpll>;
    				status = "disabled";
    				endtx-stoptx-supported;
    				frame-timeout-supported;
    			};

    I recompiled with 

    &spi00 {
    	status ="okay";
    };
    CONFIG_SPI=y
    CONFIG_SERIAL=y

    Which did not change anything. 

    I can only reach that error message at the end of compilation with the board files from this zephyr release 

    The changes thereafter which add a common dts partitioning file give me the error I posted above, as I cannot see the file located anywhere

    Thanks

  • Triple check all the numbers AGAIN. The ordinal number in the linker message is dynamic and will thus change when you make changes to the dts overlay.

    Note that the uart00 instance is disabled - it would be an error if its referenced anywhere else e.g. for console or logging.

  • I agree with  . Check the latest log output. If it still says "..._dts_ord_116", and 116 still refers to UART00:

    (Source)

    You can see, UART00 is the UART instance on 0x4a000.

    That means that UART00 is disabled, and something is trying to use your UART00. Perhaps your "CONFIG_SERIAL=y"?

    But I can't tell for sure exactly what, without seeing your project. If you'd like, feel free to zip and upload the application folder. 

    Ryan S said:
    I can only reach that error message at the end of compilation with the board files from this zephyr release 

    Are you using Zephyr directly? Or are you using the nRF Connect SDK (NCS)?

    Best regards,

    Edvin

  • Thank you very much for your detailed response. 

    After trying those steps, I upgraded everything to v3.1.0 and things worked. 

    I think I had some confusion between versions, as the board file updates are quite new. I was exporting the board files from the latest zephyr release, and tried to use them with v3.0.1. 

    v3.1.0 seems to use a later zephyr revision that contains these updates. Somebody from another thread suggesting checking https://github.com/nrfconnect/sdk-nrf/blob/main/west.yml which indicated that to me 

    Thanks again 

Related