Greetings,
trying to get PWM working with nrf5340. Unfortunately I am not able to even get the blinky PWM example compiled with the setup using SDK 2.7.0. The compile is ok nrf51822, so the environment should be in order.
The compilation log claims (for bl5340_dvk tried some other boards as well with no success):
In file included from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/toolchain/gcc.h:98,
from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/toolchain.h:50,
from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/kernel_includes.h:23,
from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/kernel.h:17,
from C:/Users/mattip-local/Projects/Nordic/Sandbox/blinky_pwm_ref/src/main.c:12:
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/device.h:91:41: error: '__device_dts_ord_DT_N_ALIAS_pwm_led0_P_pwms_IDX_0_PH_ORD' undeclared here (not in a function)
91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/toolchain/common.h:137:26: note: in definition of macro '_DO_CONCAT'
137 | #define _DO_CONCAT(x, y) x ## y
| ^
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/device.h:91:33: note: in expansion of macro '_CONCAT'
91 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/device.h:228:37: note: in expansion of macro 'DEVICE_NAME_GET'
228 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/device.h:245:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
245 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
| ^~~~~~~~~~~~~~~~~~
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/drivers/pwm.h:260:24: note: in expansion of macro 'DEVICE_DT_GET'
260 | .dev = DEVICE_DT_GET(DT_PWMS_CTLR_BY_IDX(node_id, idx)), \
| ^~~~~~~~~~~~~
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/drivers/pwm.h:328:34: note: in expansion of macro 'PWM_DT_SPEC_GET_BY_IDX'
328 | #define PWM_DT_SPEC_GET(node_id) PWM_DT_SPEC_GET_BY_IDX(node_id, 0)
| ^~~~~~~~~~~~~~~~~~~~~~
C:/Users/mattip-local/Projects/Nordic/Sandbox/blinky_pwm_ref/src/main.c:17:44: note: in expansion of macro 'PWM_DT_SPEC_GET'
17 | static const struct pwm_dt_spec pwm_led0 = PWM_DT_SPEC_GET(DT_ALIAS(pwm_led0));
| ^~~~~~~~~~~~~~~
In file included from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/arch/arm/arch.h:20,
from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/arch/cpu.h:19,
from C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/kernel_includes.h:36:
C:/Apps/NordicSemiconductor/SDKs/v2.7.0/zephyr/include/zephyr/devicetree.h:240:32: error: 'DT_N_ALIAS_pwm_led0_P_pwms_IDX_0_VAL_channel' undeclared here (not in a function)
What is wrong here?