nrfx timer example not building in nrf SDK connect

Hi,

I am trying to build the nrfx timer example (not modified in any way) in nrf SDK v2.9.0 with toolchain of the same version for the nrf52dk_52832 and I am getting the following error message:

-- Configuring incomplete, errors occurred!
See also "/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer/build/timer/CMakeFiles/CMakeOutput.log".
See also "/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer/build/timer/CMakeFiles/CMakeError.log".
CMake Error at cmake/modules/sysbuild_extensions.cmake:514 (message):
CMake configure failed for Zephyr project: timer

Location:
/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer
Call Stack (most recent call first):
cmake/modules/sysbuild_images.cmake:20 (ExternalZephyrProject_Cmake)
cmake/modules/sysbuild_default.cmake:20 (include)
/opt/nordic/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:75 (include)
/opt/nordic/ncs/v2.9.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
/opt/nordic/ncs/v2.9.0/zephyr/share/sysbuild-package/cmake/SysbuildConfig.cmake:8 (include)
template/CMakeLists.txt:10 (find_package)


-- Configuring incomplete, errors occurred!
See also "/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer/build/CMakeFiles/CMakeOutput.log".
FATAL ERROR: command exited with status 1: /opt/nordic/ncs/toolchains/b8efef2ad5/bin/cmake -DWEST_PYTHON=/opt/nordic/ncs/toolchains/b8efef2ad5/opt/[email protected]/bin/python3.12 -B/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer/build -GNinja -DBOARD=nrf52dk/nrf52832 -DNCS_TOOLCHAIN_VERSION=NONE -S/opt/nordic/ncs/v2.9.0/zephyr/share/sysbuild -DAPP_DIR:PATH=/opt/nordic/ncs/v2.9.0/modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer

Thanks in advance!

Parents
  • Hello Richard,

    I have no experience of the nrfx library but I had a quick look at the example and reproduced the problem you reported.

    The error actually happens earlier (at least on my machine) than what the log you have attached reveals.

    I believe this is the relevant error:

    CMake Error at CMakeLists.txt:11 (GET_DEVICE_CONFIG_FILES):
      GET_DEVICE_CONFIG_FILES Macro invoked with incorrect arguments for macro
      named: GET_DEVICE_CONFIG_FILES

    So a very simple fix is to comment out the invocation of that macro in this file:

    modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer/CMakeLists.txt

    like so:

    # GET_DEVICE_CONFIG_FILES(${BOARD} ../boards)
    

    That said. I have no idea if the sample application works by doing so, but at least it builds. A more proper would be to actually make the macro invocation work.

    But if the only thing the macro tries to accomplish is to add an overlay, and that if the overlay is actually needed, you may try to build like this:

    west build --build-dir build/nrfx_timer --board nrf52dk/nrf52832 \
      -DEXTRA_DTC_OVERLAY_FILE=../boards/nrf52dk_nrf52832.overlay \
      modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer

    Good luck with your project!

Reply
  • Hello Richard,

    I have no experience of the nrfx library but I had a quick look at the example and reproduced the problem you reported.

    The error actually happens earlier (at least on my machine) than what the log you have attached reveals.

    I believe this is the relevant error:

    CMake Error at CMakeLists.txt:11 (GET_DEVICE_CONFIG_FILES):
      GET_DEVICE_CONFIG_FILES Macro invoked with incorrect arguments for macro
      named: GET_DEVICE_CONFIG_FILES

    So a very simple fix is to comment out the invocation of that macro in this file:

    modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer/CMakeLists.txt

    like so:

    # GET_DEVICE_CONFIG_FILES(${BOARD} ../boards)
    

    That said. I have no idea if the sample application works by doing so, but at least it builds. A more proper would be to actually make the macro invocation work.

    But if the only thing the macro tries to accomplish is to add an overlay, and that if the overlay is actually needed, you may try to build like this:

    west build --build-dir build/nrfx_timer --board nrf52dk/nrf52832 \
      -DEXTRA_DTC_OVERLAY_FILE=../boards/nrf52dk_nrf52832.overlay \
      modules/hal/nordic/nrfx/samples/src/nrfx_timer/timer

    Good luck with your project!

Children
No Data
Related