DTS error when migrating from NCS 2.0.2 to NCS 2.1.0 or 2.1.1

We have a very simple application with an out-of-tree driver that is working fine with NCS 2.0.2.

However, changing to NCS 2.1.0 or 2.1.1 results in a DTS error:

build/zephyr/include/generated/devicetree_unfixed.h:10719:58: error: 'DT_N_S_soc_S_i2c_40003000_P_label' undeclared here (not in a function); did you mean 'DT_N_S_soc_S_i2c_40003000_P_reg'?
10719 | #define DT_N_S_soc_S_i2c_40003000_S_lps22df_press_5c_BUS DT_N_S_soc_S_i2c_40003000

(the out-of-tree driver is just an LPS22HB driver very slightly modified to work with a different LPS22 variant by just changing the WHOAMI response)

We've tried switching to the in-tree LPS22HB driver and comparing the devicetree_unfixed.h to the one generated when we use the out-of-tree driver, but they're pretty much identical so we don't know why the build is failing.lvgl_dts_test.zip

We'd really like to use 2.1.1 as it has a newer version of zephyr that we need, so help on fixing this build error would be much appreciated.

Related