DTS own node DT_N_S_ undeclared
Piotr Barszczewski <piotr@...>
I'm writing an application for nrf52832 based board ADC + voltage divider functionalty as in the great nRF battery example https://docs.zephyrproject.org/latest/samples/boards/nrf/battery/README.html. I'm adapting it to support multiple vbatt nodes from DTS and while on the code layer it's quite simple I'm struggling with the DTS.
My board dts file contains this part:
The devicetree snippet seems ok
/* Existence and alternate IDs: */
#define DT_N_S_vbatt_S_vbatt0_EXISTS 1
#define DT_N_INST_0_voltage_divider DT_N_S_vbatt_S_vbatt0
#define DT_N_NODELABEL_vbatt_lipo DT_N_S_vbatt_S_vbatt0
except for the DT_N_S_vbatt_S_vbatt0 which is not defined anywhere and as a result I'm getting:
zephyr/include/devicetree.h:73:17: error: 'DT_N_S_vbatt_S_vbatt_lipo' undeclared here (not in a function); did you mean 'DT_N_S_vbatt_S_vbatt_lipo_ORD'?
What else should I do to make my own DTS node be usable in the source file? I'm following the docs, referencing it by #define VBATT_LIPO DT_PATH(vbatt, vbatt_lipo) which is in line with the guides and docs but the DT_N_S_* is missing and I don't have a clue on how could I fix this.
Did anyone experience this before and could point me to where I could find a solution? Been trying for days now without result.