Linker failure undefined reference to `__device_dts_ord_46'

Hello,

I'm struggling with DeviceTree support in Segger Embedded Studio and nRF5340. I want to use the I2C Modul.

So I defined in my (dts)overlay file

&i2c0 {
 status = "okay";
 sda-pin = <38>;
 scl-pin = <40>;
};

/{
    aliases {
     i2c-rtc = &i2c0;
    };
};

in my source Code I want to use it then with DEVICE_DT_GET(DT_ALIAS(i2c_rtc))

In principle this should be ok, as I make it similar with some PWM Pins. It works also in that way that the Compiler doesn't complain. So all the i2c device macros are existing. Only the linker gives the error undefined reference to `__device_dts_ord_46'.

Looking in devicetree_unfixed.h you can see that 46 is the number of my wanted I2C modul
*   46  /soc/peripheral@50000000/i2c@8000

The Zephyr Driver seems also be enabled as I have 
CONFIG_I2C=y
CONFIG_I2C_NRFX=y

included in my prj.conf

So where is the Problem?

Erwin

Parents Reply Children
No Data
Related