Hello,
I am trying to run the Direct Test Mode on a custom board. We have two boards revisions, one with a nRF52832 and one with a nRF52811. I managed to build the DTM for the nRF52832 one and I edited the app.overlay to match the pinctrl we use on our custom board regarding the UART pins.
/ { chosen { ncs,dtm-uart = &uart0; }; }; &pinctrl { uart0_default: uart0_default { group1 { psels = <NRF_PSEL(UART_TX, 0, 3)>, <NRF_PSEL(UART_RX, 0, 5)>; }; }; uart0_sleep: uart0_sleep { group1 { psels = <NRF_PSEL(UART_TX, 0, 3)>, <NRF_PSEL(UART_RX, 0, 5)>; low-power-enable; }; }; }; &uart0 { status = "okay"; current-speed = < 19200 >; pinctrl-0 = < &uart0_default >; pinctrl-1 = < &uart0_sleep >; };
Everything is working fine on this one and I could even test it both with the CLI and the GUI provided in nRF for Desktop.
After that, I tried to make it work on the nRF52811 one but I get FATAL_ERROR during the compiling step :
* Executing task: nRF Connect: Build [pristine]: direct_test_mode/build_ISP1907ll (active) Building direct_test_mode west build --build-dir /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode --pristine --board nrf52840dk_nrf52811 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode -DCACHED_CONF_FILE=/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/prj.conf -- west build: generating a build system Loading Zephyr default modules (Zephyr base). -- Application: /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode -- CMake version: 3.20.5 -- Found Python3: /home/[myuser]/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found suitable version "3.8.2", minimum required is "3.8") found components: Interpreter -- Cache files will be written to: /home/[myuser]/.cache/zephyr -- Zephyr version: 3.4.99 (/home/[myuser]/ncs/v2.5.1/zephyr) -- Found west (found suitable version "1.1.0", minimum required is "0.14.0") -- Board: nrf52840dk_nrf52811 -- Found host-tools: zephyr 0.16.1 (/home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk) -- Found toolchain: zephyr 0.16.1 (/home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk) -- Found Dtc: /home/[myuser]/ncs/toolchains/7795df4459/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") -- Found BOARD.dts: /home/[myuser]/ncs/v2.5.1/zephyr/boards/arm/nrf52840dk_nrf52811/nrf52840dk_nrf52811.dts -- Generated zephyr.dts: /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/zephyr.dts -- Generated devicetree_generated.h: /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/include/generated/devicetree_generated.h -- Including generated dts.cmake file: /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/dts.cmake Parsing /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/Kconfig Loaded configuration '/home/[myuser]/ncs/v2.5.1/zephyr/boards/arm/nrf52840dk_nrf52811/nrf52840dk_nrf52811_defconfig' Merged configuration '/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/prj.conf' Configuration saved to '/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/.config' Kconfig header saved to '/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/include/generated/autoconf.h' -- Found GnuLd: /home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") -- The C compiler identification is GNU 12.2.0 -- The CXX compiler identification is GNU 12.2.0 -- The ASM compiler identification is GNU -- Found assembler: /home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc CMake Warning at /home/[myuser]/ncs/v2.5.1/zephyr/CMakeLists.txt:1958 (message): __ASSERT() statements are globally ENABLED -- Configuring done -- Generating done -- Build files have been written to: /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll -- west build: building application [1/148] Preparing syscall dependency handling [4/148] Generating include/generated/version.h -- Zephyr version: 3.4.99 (/home/[myuser]/ncs/v2.5.1/zephyr), build: v3.4.99-ncs1-1 [16/148] Building C object CMakeFiles/app.dir/src/dtm_hw.c.obj FAILED: CMakeFiles/app.dir/src/dtm_hw.c.obj ccache /home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DDEVELOP_IN_NRF52840 -DKERNEL -DNRF52811_XXAA -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I.././src -I/home/[myuser]/ncs/v2.5.1/zephyr/include -Izephyr/include/generated -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/common/. -I/home/[myuser]/ncs/v2.5.1/nrf/include -I/home/[myuser]/ncs/v2.5.1/nrf/lib/fem_al/. -I/home/[myuser]/ncs/v2.5.1/nrf/tests/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/cmsis/CMSIS/Core/Include -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/cmsis/. -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/mdk -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/. -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/SEGGER -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/Config -fno-strict-aliasing -Os -imacros /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/[myuser]/ncs/v2.5.1/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 -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/dtm_hw.c.obj -MF CMakeFiles/app.dir/src/dtm_hw.c.obj.d -o CMakeFiles/app.dir/src/dtm_hw.c.obj -c ../src/dtm_hw.c In file included from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain.h:50, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sys/time_units.h:10, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sys/util.h:615, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:25, from /home/[myuser]/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/./nrfx_config.h:10, from /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/nrfx.h:37, from /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/hal/nrf_radio.h:37, from ../src/dtm_hw.h:13, from ../src/dtm_hw.c:9: /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:36: error: static assertion failed: "You must set the dfe-antenna-num property in the radio node to enable antenna switching." 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~~~~~~~~~~~ ../src/dtm_hw.c:106:1: note: in expansion of macro 'BUILD_ASSERT' 106 | BUILD_ASSERT(HAS_ANTENNA_NUM, | ^~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:36: error: static assertion failed: "Missing antenna pattern used to select antenna for PDU Tx during the CTE Idle state. Set the dfe-pdu-antenna devicetree property." 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~~~~~~~~~~~ ../src/dtm_hw.c:122:1: note: in expansion of macro 'BUILD_ASSERT' 122 | BUILD_ASSERT(HAS_PDU_ANTENNA, | ^~~~~~~~~~~~ ../src/dtm_hw.c: In function 'dtm_hw_radio_pdu_antenna_get': zephyr/include/generated/devicetree_generated.h:9057:38: error: 'DT_N_S_soc_S_radio_40001000_P_dfe_pdu_antenna' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_radio_40001000_P_dfe_supported'? 9057 | #define DT_N_NODELABEL_radio DT_N_S_soc_S_radio_40001000 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:4231:29: note: in definition of macro 'DT_CAT3' 4231 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3 | ^~ ../src/dtm_hw.c:85:21: note: in expansion of macro 'DT_PROP' 85 | #define PDU_ANTENNA DT_PROP(RADIO_NODE, dfe_pdu_antenna) | ^~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:4229:24: note: in expansion of macro 'DT_N_NODELABEL_radio' 4229 | #define DT_CAT(a1, a2) a1 ## a2 | ^~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:197:29: note: in expansion of macro 'DT_CAT' 197 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label) | ^~~~~~ ../src/dtm_hw_config.h:15:20: note: in expansion of macro 'DT_NODELABEL' 15 | #define RADIO_NODE DT_NODELABEL(radio) | ^~~~~~~~~~~~ ../src/dtm_hw.c:85:29: note: in expansion of macro 'RADIO_NODE' 85 | #define PDU_ANTENNA DT_PROP(RADIO_NODE, dfe_pdu_antenna) | ^~~~~~~~~~ ../src/dtm_hw.c:228:16: note: in expansion of macro 'PDU_ANTENNA' 228 | return PDU_ANTENNA; | ^~~~~~~~~~~ zephyr/include/generated/devicetree_generated.h:9057:38: note: each undeclared identifier is reported only once for each function it appears in 9057 | #define DT_N_NODELABEL_radio DT_N_S_soc_S_radio_40001000 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:4231:29: note: in definition of macro 'DT_CAT3' 4231 | #define DT_CAT3(a1, a2, a3) a1 ## a2 ## a3 | ^~ ../src/dtm_hw.c:85:21: note: in expansion of macro 'DT_PROP' 85 | #define PDU_ANTENNA DT_PROP(RADIO_NODE, dfe_pdu_antenna) | ^~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:4229:24: note: in expansion of macro 'DT_N_NODELABEL_radio' 4229 | #define DT_CAT(a1, a2) a1 ## a2 | ^~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:197:29: note: in expansion of macro 'DT_CAT' 197 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label) | ^~~~~~ ../src/dtm_hw_config.h:15:20: note: in expansion of macro 'DT_NODELABEL' 15 | #define RADIO_NODE DT_NODELABEL(radio) | ^~~~~~~~~~~~ ../src/dtm_hw.c:85:29: note: in expansion of macro 'RADIO_NODE' 85 | #define PDU_ANTENNA DT_PROP(RADIO_NODE, dfe_pdu_antenna) | ^~~~~~~~~~ ../src/dtm_hw.c:228:16: note: in expansion of macro 'PDU_ANTENNA' 228 | return PDU_ANTENNA; | ^~~~~~~~~~~ ../src/dtm_hw.c:229:1: warning: control reaches end of non-void function [-Wreturn-type] 229 | } | ^ [34/148] Building C object CMakeFiles/app.dir/src/transport/dtm_uart_wait.c.obj FAILED: CMakeFiles/app.dir/src/transport/dtm_uart_wait.c.obj ccache /home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DDEVELOP_IN_NRF52840 -DKERNEL -DNRF52811_XXAA -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I.././src -I/home/[myuser]/ncs/v2.5.1/zephyr/include -Izephyr/include/generated -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/common/. -I/home/[myuser]/ncs/v2.5.1/nrf/include -I/home/[myuser]/ncs/v2.5.1/nrf/lib/fem_al/. -I/home/[myuser]/ncs/v2.5.1/nrf/tests/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/cmsis/CMSIS/Core/Include -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/cmsis/. -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/mdk -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/. -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/SEGGER -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/Config -fno-strict-aliasing -Os -imacros /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/[myuser]/ncs/v2.5.1/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 -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/transport/dtm_uart_wait.c.obj -MF CMakeFiles/app.dir/src/transport/dtm_uart_wait.c.obj.d -o CMakeFiles/app.dir/src/transport/dtm_uart_wait.c.obj -c ../src/transport/dtm_uart_wait.c ../src/transport/dtm_uart_wait.c:40:2: error: #error "DTM UART node not found" 40 | #error "DTM UART node not found" | ^~~~~ ../src/transport/dtm_uart_wait.c: In function 'dtm_uart_wait_init': ../src/transport/dtm_uart_wait.c:77:53: error: 'DTM_UART_POLL_CYCLE' undeclared (first use in this function) 77 | nrfx_timer_us_to_ticks(&wait_timer, DTM_UART_POLL_CYCLE), | ^~~~~~~~~~~~~~~~~~~ ../src/transport/dtm_uart_wait.c:77:53: note: each undeclared identifier is reported only once for each function it appears in [36/148] Building C object CMakeFiles/app.dir/src/transport/dtm_uart_twowire.c.obj FAILED: CMakeFiles/app.dir/src/transport/dtm_uart_twowire.c.obj ccache /home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DDEVELOP_IN_NRF52840 -DKERNEL -DNRF52811_XXAA -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I.././src -I/home/[myuser]/ncs/v2.5.1/zephyr/include -Izephyr/include/generated -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/common/. -I/home/[myuser]/ncs/v2.5.1/nrf/include -I/home/[myuser]/ncs/v2.5.1/nrf/lib/fem_al/. -I/home/[myuser]/ncs/v2.5.1/nrf/tests/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/cmsis/CMSIS/Core/Include -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/cmsis/. -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/mdk -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/. -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/SEGGER -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/Config -fno-strict-aliasing -Os -imacros /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/[myuser]/ncs/v2.5.1/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 -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/transport/dtm_uart_twowire.c.obj -MF CMakeFiles/app.dir/src/transport/dtm_uart_twowire.c.obj.d -o CMakeFiles/app.dir/src/transport/dtm_uart_twowire.c.obj -c ../src/transport/dtm_uart_twowire.c In file included from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:92, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain.h:50, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sys/time_units.h:10, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sys/util.h:615, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:25, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/device.h:12, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/drivers/uart.h:26, from ../src/transport/dtm_uart_twowire.c:8: /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:41: error: '__device_dts_ord_DT_CHOSEN_ncs_dtm_uart_ORD' undeclared here (not in a function) 85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT' 132 | #define _DO_CONCAT(x, y) x ## y | ^ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT' 85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET' 211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id)) | ^~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET' 228 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id)) | ^~~~~~~~~~~~~~~~~~ ../src/transport/dtm_uart_twowire.c:73:40: note: in expansion of macro 'DEVICE_DT_GET' 73 | static const struct device *dtm_uart = DEVICE_DT_GET(DTM_UART); | ^~~~~~~~~~~~~ [37/148] Building C object CMakeFiles/app.dir/src/dtm.c.obj FAILED: CMakeFiles/app.dir/src/dtm.c.obj ccache /home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DDEVELOP_IN_NRF52840 -DKERNEL -DNRF52811_XXAA -DNRFX_COREDEP_DELAY_US_LOOP_CYCLES=3 -DPICOLIBC_INTEGER_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I.././src -I/home/[myuser]/ncs/v2.5.1/zephyr/include -Izephyr/include/generated -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/[myuser]/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/common/. -I/home/[myuser]/ncs/v2.5.1/nrf/include -I/home/[myuser]/ncs/v2.5.1/nrf/lib/fem_al/. -I/home/[myuser]/ncs/v2.5.1/nrf/tests/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/cmsis/CMSIS/Core/Include -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/cmsis/. -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include -I/home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/mdk -I/home/[myuser]/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/. -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/SEGGER -I/home/[myuser]/ncs/v2.5.1/modules/debug/segger/Config -fno-strict-aliasing -Os -imacros /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=/home/[myuser]/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros /home/[myuser]/ncs/v2.5.1/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 -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/[myuser]/ncs/v2.5.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/dtm.c.obj -MF CMakeFiles/app.dir/src/dtm.c.obj.d -o CMakeFiles/app.dir/src/dtm.c.obj -c ../src/dtm.c In file included from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain.h:50, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sys/time_units.h:10, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sys/util.h:615, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/devicetree.h:25, from ../src/dtm.h:12, from ../src/dtm.c:10: ../src/dtm.c:60:53: error: 'CONFIG_NRFX_TIMER3' undeclared here (not in a function); did you mean 'CONFIG_NRFX_TIMER0'? 60 | #define NRFX_TIMER_CONFIG_LABEL(_num) NRFX_CONCAT_3(CONFIG_, NRFX_TIMER, _num) | ^~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT' 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:185:35: note: in expansion of macro 'NRFX_CONCAT_3_' 185 | #define NRFX_CONCAT_3(p1, p2, p3) NRFX_CONCAT_3_(p1, p2, p3) | ^~~~~~~~~~~~~~ ../src/dtm.c:60:39: note: in expansion of macro 'NRFX_CONCAT_3' 60 | #define NRFX_TIMER_CONFIG_LABEL(_num) NRFX_CONCAT_3(CONFIG_, NRFX_TIMER, _num) | ^~~~~~~~~~~~~ ../src/dtm.c:65:14: note: in expansion of macro 'NRFX_TIMER_CONFIG_LABEL' 65 | BUILD_ASSERT(NRFX_TIMER_CONFIG_LABEL(ANOMALY_172_TIMER_INSTANCE) == 1, | ^~~~~~~~~~~~~~~~~~~~~~~ ../src/dtm.c:60:53: error: expression in static assertion is not an integer 60 | #define NRFX_TIMER_CONFIG_LABEL(_num) NRFX_CONCAT_3(CONFIG_, NRFX_TIMER, _num) | ^~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT' 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:185:35: note: in expansion of macro 'NRFX_CONCAT_3_' 185 | #define NRFX_CONCAT_3(p1, p2, p3) NRFX_CONCAT_3_(p1, p2, p3) | ^~~~~~~~~~~~~~ ../src/dtm.c:60:39: note: in expansion of macro 'NRFX_CONCAT_3' 60 | #define NRFX_TIMER_CONFIG_LABEL(_num) NRFX_CONCAT_3(CONFIG_, NRFX_TIMER, _num) | ^~~~~~~~~~~~~ ../src/dtm.c:65:14: note: in expansion of macro 'NRFX_TIMER_CONFIG_LABEL' 65 | BUILD_ASSERT(NRFX_TIMER_CONFIG_LABEL(ANOMALY_172_TIMER_INSTANCE) == 1, | ^~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/nrfx.h:38, from /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/hal/nrf_radio.h:37, from ../src/dtm_hw.h:13, from ../src/dtm.c:11: /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include/nrfx_timer.h:64:39: error: 'NRF_TIMER3' undeclared here (not in a function); did you mean 'NRF_TIMER0'? 64 | .p_reg = NRFX_CONCAT_2(NRF_TIMER, id), \ | ^~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:167:32: note: in definition of macro 'NRFX_CONCAT_2_' 167 | #define NRFX_CONCAT_2_(p1, p2) p1 ## p2 | ^~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include/nrfx_timer.h:64:25: note: in expansion of macro 'NRFX_CONCAT_2' 64 | .p_reg = NRFX_CONCAT_2(NRF_TIMER, id), \ | ^~~~~~~~~~~~~ ../src/dtm.c:398:26: note: in expansion of macro 'NRFX_TIMER_INSTANCE' 398 | .anomaly_timer = NRFX_TIMER_INSTANCE(ANOMALY_172_TIMER_INSTANCE), | ^~~~~~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include/nrfx_timer.h:65:39: error: 'NRFX_TIMER3_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER2_INST_IDX'? 65 | .instance_id = NRFX_CONCAT_3(NRFX_TIMER, id, _INST_IDX), \ | ^~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:188:36: note: in definition of macro 'NRFX_CONCAT_3_' 188 | #define NRFX_CONCAT_3_(p1, p2, p3) p1 ## p2 ## p3 | ^~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include/nrfx_timer.h:65:25: note: in expansion of macro 'NRFX_CONCAT_3' 65 | .instance_id = NRFX_CONCAT_3(NRFX_TIMER, id, _INST_IDX), \ | ^~~~~~~~~~~~~ ../src/dtm.c:398:26: note: in expansion of macro 'NRFX_TIMER_INSTANCE' 398 | .anomaly_timer = NRFX_TIMER_INSTANCE(ANOMALY_172_TIMER_INSTANCE), | ^~~~~~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/hal/nrf_timer.h:242:54: error: 'TIMER3_CC_NUM' undeclared here (not in a function); did you mean 'TIMER2_CC_NUM'? 242 | #define NRF_TIMER_CC_CHANNEL_COUNT(id) NRFX_CONCAT_3(TIMER, id, _CC_NUM) | ^~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:188:36: note: in definition of macro 'NRFX_CONCAT_3_' 188 | #define NRFX_CONCAT_3_(p1, p2, p3) p1 ## p2 ## p3 | ^~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/hal/nrf_timer.h:242:40: note: in expansion of macro 'NRFX_CONCAT_3' 242 | #define NRF_TIMER_CC_CHANNEL_COUNT(id) NRFX_CONCAT_3(TIMER, id, _CC_NUM) | ^~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include/nrfx_timer.h:66:25: note: in expansion of macro 'NRF_TIMER_CC_CHANNEL_COUNT' 66 | .cc_channel_count = NRF_TIMER_CC_CHANNEL_COUNT(id), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/dtm.c:398:26: note: in expansion of macro 'NRFX_TIMER_INSTANCE' 398 | .anomaly_timer = NRFX_TIMER_INSTANCE(ANOMALY_172_TIMER_INSTANCE), | ^~~~~~~~~~~~~~~~~~~ ../src/dtm.c: In function 'anomaly_timer_init': ../src/dtm.c:672:21: error: 'CONFIG_ANOMALY_172_TIMER_IRQ_PRIORITY' undeclared (first use in this function); did you mean 'CONFIG_DTM_TIMER_IRQ_PRIORITY'? 672 | CONFIG_ANOMALY_172_TIMER_IRQ_PRIORITY, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT' 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/arm/aarch32/irq.h:128:9: note: in expansion of macro '_CHECK_PRIO' 128 | _CHECK_PRIO(priority_p, flags_p) \ | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT' 49 | ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) | ^~~~~~~~~~~~~~~~ ../src/dtm.c:671:9: note: in expansion of macro 'IRQ_CONNECT' 671 | IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, | ^~~~~~~~~~~ ../src/dtm.c:672:21: note: each undeclared identifier is reported only once for each function it appears in 672 | CONFIG_ANOMALY_172_TIMER_IRQ_PRIORITY, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT' 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/arm/aarch32/irq.h:128:9: note: in expansion of macro '_CHECK_PRIO' 128 | _CHECK_PRIO(priority_p, flags_p) \ | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT' 49 | ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) | ^~~~~~~~~~~~~~~~ ../src/dtm.c:671:9: note: in expansion of macro 'IRQ_CONNECT' 671 | IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/arm/aarch32/irq.h:105:22: error: expression in static assertion is not an integer 105 | BUILD_ASSERT(((flags_p & IRQ_ZERO_LATENCY) && \ | ^ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:81:51: note: in definition of macro 'BUILD_ASSERT' 81 | #define BUILD_ASSERT(EXPR, MSG...) _Static_assert(EXPR, "" MSG) | ^~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/arm/aarch32/irq.h:128:9: note: in expansion of macro '_CHECK_PRIO' 128 | _CHECK_PRIO(priority_p, flags_p) \ | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT' 49 | ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) | ^~~~~~~~~~~~~~~~ ../src/dtm.c:671:9: note: in expansion of macro 'IRQ_CONNECT' 671 | IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, | ^~~~~~~~~~~ In file included from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/arm/aarch32/irq.h:19, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/arm/aarch32/arch.h:27, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/arch/cpu.h:19, from /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/irq.h:15, from /home/[myuser]/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/./nrfx_glue.h:12, from /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/nrfx.h:39: ../src/dtm.c:51:54: error: 'TIMER3_IRQn' undeclared (first use in this function); did you mean 'TIMER2_IRQn'? 51 | #define ANOMALY_172_TIMER_IRQ NRFX_CONCAT_3(TIMER, \ | ^~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sw_isr_table.h:77:26: note: in definition of macro 'Z_ISR_DECLARE' 77 | {irq, flags, (void *)&func, (const void *)param} | ^~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT' 49 | ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) | ^~~~~~~~~~~~~~~~ ../src/dtm.c:671:9: note: in expansion of macro 'IRQ_CONNECT' 671 | IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:185:35: note: in expansion of macro 'NRFX_CONCAT_3_' 185 | #define NRFX_CONCAT_3(p1, p2, p3) NRFX_CONCAT_3_(p1, p2, p3) | ^~~~~~~~~~~~~~ ../src/dtm.c:51:40: note: in expansion of macro 'NRFX_CONCAT_3' 51 | #define ANOMALY_172_TIMER_IRQ NRFX_CONCAT_3(TIMER, \ | ^~~~~~~~~~~~~ ../src/dtm.c:671:21: note: in expansion of macro 'ANOMALY_172_TIMER_IRQ' 671 | IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, | ^~~~~~~~~~~~~~~~~~~~~ ../src/dtm.c:54:54: error: 'nrfx_timer_3_irq_handler' undeclared (first use in this function); did you mean 'nrfx_timer_2_irq_handler'? 54 | #define ANOMALY_172_TIMER_IRQ_HANDLER NRFX_CONCAT_3(nrfx_timer_, \ | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/sw_isr_table.h:77:47: note: in definition of macro 'Z_ISR_DECLARE' 77 | {irq, flags, (void *)&func, (const void *)param} | ^~~~ /home/[myuser]/ncs/v2.5.1/zephyr/include/zephyr/irq.h:49:9: note: in expansion of macro 'ARCH_IRQ_CONNECT' 49 | ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) | ^~~~~~~~~~~~~~~~ ../src/dtm.c:671:9: note: in expansion of macro 'IRQ_CONNECT' 671 | IRQ_CONNECT(ANOMALY_172_TIMER_IRQ, | ^~~~~~~~~~~ /home/[myuser]/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/nrfx_common.h:185:35: note: in expansion of macro 'NRFX_CONCAT_3_' 185 | #define NRFX_CONCAT_3(p1, p2, p3) NRFX_CONCAT_3_(p1, p2, p3) | ^~~~~~~~~~~~~~ ../src/dtm.c:54:40: note: in expansion of macro 'NRFX_CONCAT_3' 54 | #define ANOMALY_172_TIMER_IRQ_HANDLER NRFX_CONCAT_3(nrfx_timer_, \ | ^~~~~~~~~~~~~ ../src/dtm.c:673:21: note: in expansion of macro 'ANOMALY_172_TIMER_IRQ_HANDLER' 673 | ANOMALY_172_TIMER_IRQ_HANDLER, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: /home/[myuser]/ncs/toolchains/7795df4459/usr/local/bin/cmake --build /home/[myuser]/ncs/v2.5.1/nrf/samples/bluetooth/direct_test_mode/build_ISP1907ll * The terminal process terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it.
I use the same overlay as we also have mapped the UART pins on pin 5 and 3 for this board. I also tried to remove my modification in the app.overlay, trying to build for a Dev Kit version of the 52811 and I still have the exact same error.
Can I have some support to make this compile?
Regards,
Fabien