Errors (no HAS_NRFX and no CPU_HAS_MPU?) with custom board in NCS v3.1.0

I need to use PPI on my custom nRF52840 board, which selects soc nRF52840 as per copying nrf52840dk. However, this doesn't enable "HAS_NRFX", which is hard to track how that gets enabled.

I created a minimum reproducible sample that shows how using my custom board fails but using nrf52840dk/nrf52840 as the target succeeds.

Build command that fails:

west build --build-dir d:/ody/custom-board/build d:/ody/custom-board --pristine --board ats_mot --no-sysbuild -- -DBOARD_ROOT="d:/ody/custom-board"

Build command that succeeds:

west build --build-dir d:/ody/custom-board/build d:/ody/custom-board --pristine --board nrf52840dk/nrf52840 --no-sysbuild

0310.custom-board.zip

Build output for failing command:

west build --build-dir d:/ody/custom-board/build d:/ody/custom-board --pristine --board ats_mot --no-sysbuild -- -DBOARD_ROOT="d:/ody/custom-board"

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: D:/ody/custom-board
-- CMake version: 3.21.0
-- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: C:/ncs/v3.1.0/zephyr/.cache
-- Zephyr version: 4.1.99 (C:/ncs/v3.1.0/zephyr)
-- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
-- Board: ats_mot, qualifiers: nrf52840
-- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/0b393f9e1b/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: D:/ody/custom-board/boards/nordic/ats_mot/ats_mot_nrf52840.dts
-- Generated zephyr.dts: D:/ody/custom-board/build/zephyr/zephyr.dts
-- Generated pickled edt: D:/ody/custom-board/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: D:/ody/custom-board/build/zephyr/include/generated/zephyr/devicetree_generated.h

warning: NRFX_PPI (defined at C:/ncs/v3.1.0/zephyr/modules/hal_nordic\nrfx/Kconfig:311,
modules\hal_nordic\nrfx/Kconfig:311) was assigned the value 'y' but got the value 'n'. Check these
unsatisfied dependencies: (HAS_NRFX || (HAS_NRFX && 0)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_PPI and/or look up NRFX_PPI in the
menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
and Kconfig - Tips and Best Practices sections of the manual might be helpful too.


warning: NRFX_TIMER1 (defined at C:/ncs/v3.1.0/zephyr/modules/hal_nordic\nrfx/Kconfig:761,
modules\hal_nordic\nrfx/Kconfig:761, drivers/serial\Kconfig.nrfx:222) was assigned the value 'y' but
got the value 'n'. Check these unsatisfied dependencies: (HAS_NRFX || (HAS_NRFX && 0) ||
((UART_0_NRF_HW_ASYNC_TIMER = 1 || UART_1_NRF_HW_ASYNC_TIMER = 1 || UART_2_NRF_HW_ASYNC_TIMER = 1 ||
UART_3_NRF_HW_ASYNC_TIMER = 1) && UART_NRFX && SERIAL)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_NRFX_TIMER1 and/or look up NRFX_TIMER1 in
the menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration
Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful too.


warning: USE_SEGGER_RTT (defined at C:/ncs/v3.1.0/zephyr/modules/segger/Kconfig:12,
modules\segger\Kconfig:12) was assigned the value 'y' but got the value 'n'. Check these unsatisfied
dependencies: (HAS_SEGGER_RTT || (HAS_SEGGER_RTT && 0)) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_USE_SEGGER_RTT and/or look up
USE_SEGGER_RTT in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.


warning: ARM_MPU (defined at arch/common/Kconfig:27) was assigned the value 'y' but got the value
'n'. Check these unsatisfied dependencies: CPU_HAS_MPU (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_ARM_MPU and/or look up ARM_MPU in the
menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

and some other warnings after about dcdc that I'm ommitting for now.

Parents
  • Hello, 

    Thank you for your patience over the weekend. 

    Both HAS_NRFX and CPU_HAS_ARM_MPU are selected by CONFIG_SOC_SERIES_NRF52X, so I dug a little into the board files in nRF Connect SDK and compared them with the board files you shared. 

    It seems that you have a kind of circular dependency in custom-board\boards\nordic\ats_mot\Kconfig.ats_mot_nrf52840 where BOARD_ATS_MOT selects SOC_NRF52840_QIAA only if BOARD_ATS_MOT is set. In the equivalent file for the nRF52840 DK, the symbol which conditionally selects SOC_NRF52840_QIAA is different from the symbol being defined. See line 5 in v3.1.0/zephyr/boards/nordic/nrf52840dk/Kconfig.nrf52840dk

    So you may need to redefine one of the symbols which are now the same, most likely the one defined in Kconfig.ats_mot_nrf52840. 

    I did not have the chance to test this myself today, but I hope this finding is a good start to solve the build issue. 

    Best regards,

    Maria

Reply
  • Hello, 

    Thank you for your patience over the weekend. 

    Both HAS_NRFX and CPU_HAS_ARM_MPU are selected by CONFIG_SOC_SERIES_NRF52X, so I dug a little into the board files in nRF Connect SDK and compared them with the board files you shared. 

    It seems that you have a kind of circular dependency in custom-board\boards\nordic\ats_mot\Kconfig.ats_mot_nrf52840 where BOARD_ATS_MOT selects SOC_NRF52840_QIAA only if BOARD_ATS_MOT is set. In the equivalent file for the nRF52840 DK, the symbol which conditionally selects SOC_NRF52840_QIAA is different from the symbol being defined. See line 5 in v3.1.0/zephyr/boards/nordic/nrf52840dk/Kconfig.nrf52840dk

    So you may need to redefine one of the symbols which are now the same, most likely the one defined in Kconfig.ats_mot_nrf52840. 

    I did not have the chance to test this myself today, but I hope this finding is a good start to solve the build issue. 

    Best regards,

    Maria

Children
Related