When I am building lesson 6 - Serial communication (I2C) I am getting the following error. I cannot solve this as it seems to originate from within the library that is being included.
The code that is being run is the original code for the example. everything else has been commented out, yet the issue remains.
I am using SDK 2.2.0 and Nrf connect 4.0, Toolchain manager 1.2.2.
Can you elaborate on what this error is referring to?
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/device.h:83:41: error: '__device_dts_ord_114' undeclared here (not in a function); did you mean '__device_dts_ord_14'?
83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/sys/util_internal.h:72:26: note: in definition of macro '__DEBRACKET'
72 | #define __DEBRACKET(...) __VA_ARGS__
| ^~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/sys/util_internal.h:64:9: note: in expansion of macro '__GET_ARG2_DEBRACKET'
64 | __GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
| ^~~~~~~~~~~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/sys/util_internal.h:59:9: note: in expansion of macro '__COND_CODE'
59 | __COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/sys/util_macro.h:157:9: note: in expansion of macro 'Z_COND_CODE_1'
157 | Z_COND_CODE_1(_flag, _if_1_code, _else_code)
| ^~~~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/drivers/i2c.h:122:17: note: in expansion of macro 'COND_CODE_1'
122 | COND_CODE_1(DT_ON_BUS(node_id, i3c), \
| ^~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/drivers/i2c.h:107:16: note: in expansion of macro 'DEVICE_DT_GET'
107 | .bus = DEVICE_DT_GET(DT_BUS(node_id)), \
| ^~~~~~~~~~~~~
/opt/nordic/ncs/v2.2.0/zephyr/include/zephyr/drivers/i2c.h:124:30: note: in expansion of macro 'I2C_DT_SPEC_GET_ON_I2C'
124 | (I2C_DT_SPEC_GET_ON_I2C(node_id))) \
| ^~~~~~~~~~~~~~~~~~~~~~
/Users/magnusbenedikt/Documents/nRFWorkspace/fdc2x1x-fiff/src/main.c:155:43: note: in expansion of macro 'I2C_DT_SPEC_GET'
155 | static const struct i2c_dt_spec dev_i2c = I2C_DT_SPEC_GET(I2C0_NODE);
| ^~~~~~~~~~~~~~~
/Users/magnusbenedikt/Documents/nRFWorkspace/fdc2x1x-fiff/src/main.c:157:1: error: expected identifier or '(' before 'if'
157 | if (!device_is_ready(dev_i2c.bus)) {
| ^~
/Users/magnusbenedikt/Documents/nRFWorkspace/fdc2x1x-fiff/src/main.c:155:33: warning: 'dev_i2c' defined but not used [-Wunused-const-variable=]
155 | static const struct i2c_dt_spec dev_i2c = I2C_DT_SPEC_GET(I2C0_NODE);
| ^~~~~~~
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/v2.2.0/bin/cmake --build /Users/magnusbenedikt/Documents/nRFWorkspace/fdc2x1x-fiff/build