I would like to access RTC1 through NRFX_RTC_INSTANCE macro. But west build failed. Does you have any suggestion?
static const nrfx_rtc_t _gRtcInst0 = NRFX_RTC_INSTANCE(1);
C:\ncs\v2.4.2\nrf\samples\rtc>west build -b nrf5340dk_nrf5340_cpuapp [2/106] Building C object CMakeFiles/app.dir/src/main.c.obj FAILED: CMakeFiles/app.dir/src/main.c.obj C:\ncs\toolchains\31f4403e35\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=0 -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.4.2/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.4.2/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.4.2/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.4.2/nrf/include -IC:/ncs/v2.4.2/nrf/tests/include -IC:/ncs/v2.4.2/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.4.2/modules/hal/nordic/nrfx -IC:/ncs/v2.4.2/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.4.2/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.4.2/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.4.2/modules/debug/segger/SEGGER -IC:/ncs/v2.4.2/modules/debug/segger/Config -IC:/ncs/v2.4.2/zephyr/modules/segger/. -isystem C:/ncs/v2.4.2/zephyr/lib/libc/minimal/include -isystem c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include -isystem c:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/include-fixed -isystem C:/ncs/v2.4.2/nrfxlib/crypto/nrf_cc312_platform/include -fno-strict-aliasing -Os -imacros C:/ncs/v2.4.2/nrf/samples/rtc/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs --sysroot=C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.4.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/v2.4.2/nrf/samples/rtc=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.4.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.4.2=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c In file included from C:/ncs/v2.4.2/modules/hal/nordic/nrfx/nrfx.h:38, from C:/ncs/v2.4.2/modules/hal/nordic/nrfx/hal/nrf_rtc.h:37, from ../src/main.c:7: C:/ncs/v2.4.2/modules/hal/nordic/nrfx/drivers/include/nrfx_rtc.h:79:39: error: 'NRFX_RTC1_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_RTC_INT_TICK'? 79 | .instance_id = NRFX_CONCAT_3(NRFX_RTC, id, _INST_IDX), \ | ^~~~~~~~ C:/ncs/v2.4.2/modules/hal/nordic/nrfx/drivers/nrfx_common.h:140:37: note: in definition of macro 'NRFX_CONCAT_3_' 140 | #define NRFX_CONCAT_3_(p1, p2, p3) p1 ## p2 ## p3 | ^~ C:/ncs/v2.4.2/modules/hal/nordic/nrfx/drivers/include/nrfx_rtc.h:79:25: note: in expansion of macro 'NRFX_CONCAT_3' 79 | .instance_id = NRFX_CONCAT_3(NRFX_RTC, id, _INST_IDX), \ | ^~~~~~~~~~~~~ ../src/main.c:27:41: note: in expansion of macro 'NRFX_RTC_INSTANCE' 27 | static const nrfx_rtc_t _gRtcInst0 = NRFX_RTC_INSTANCE(1); | ^~~~~~~~~~~~~~~~~ ../src/main.c:27:28: warning: '_gRtcInst0' defined but not used [-Wunused-const-variable=] 27 | static const nrfx_rtc_t _gRtcInst0 = NRFX_RTC_INSTANCE(1); | ^~~~~~~~~~ [11/106] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' --build 'C:\ncs\v2.4.2\nrf\samples\rtc\build'
Procedures to reproduce this issue are as follows.
1. Unzipping rtc.zip to C:\ncs\v2.4.2\nrf\samples folder.
2. west build -b nrf5340dk_nrf5340_cpuapp