NCS v1.8.0: OpenThread: nrf-config.h: No such file or directory

I have a project using NCS v1.8.0 where I enabled openthread.

For some reason, when trying to build `mbedtls/library/ecjpake.c`, the make command uses `-DMBEDTLS_CONFIG_FILE=\"nrf-config.h\"` and fails on:

> nrf-config.h: No such file or directory

I'm not sure why it tries to use this file because `MBEDTLS_CFG_FILE` is set to `config-tls-generic.h`.

Here is my defconfig:

```

CONFIG_GPIO=y
CONFIG_PM_DEVICE=y
CONFIG_NUM_METAIRQ_PRIORITIES=0
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1024
CONFIG_MAIN_STACK_SIZE=1024
# CONFIG_INIT_STACKS is not set
# CONFIG_OPENTHREAD_MANUAL_START is not set
CONFIG_MBEDTLS_BUILTIN=y
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_NFCT_PINS_AS_GPIOS=y
CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y
# CONFIG_IEEE802154 is not set
CONFIG_ENTROPY_NRF5_THR_THRESHOLD=4
CONFIG_ENTROPY_NRF5_ISR_THRESHOLD=12
CONFIG_MINIMAL_LIBC=y
CONFIG_NETWORKING=y
CONFIG_NET_L2_OPENTHREAD=y
CONFIG_OPENTHREAD_THREAD_VERSION_1_2=y
CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff"
CONFIG_OPENTHREAD_MTD=y
CONFIG_OPENTHREAD_MTD_SED=y

```

and the full error:

```

FAILED: modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/workdir/project/mbedtls/library/ecjpake.c.obj
/workdir/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -I/workdir/project/zephyr/include -I/workdir/project/application/build/zephyr/include/generated -I/workdir/project/zephyr/soc/arm/nordic_nrf/nrf52 -I/workdir/project/zephyr/lib/libc/minimal/include -I/workdir/project/zephyr/subsys/cpp/include -I/workdir/project/zephyr/subsys/net/lib/conn_mgr/. -I/workdir/project/zephyr/subsys/net/lib/openthread/platform/. -I/workdir/project/zephyr/subsys/settings/include -I/workdir/project/nrf/include -I/workdir/project/modules/hal/cmsis/CMSIS/Core/Include -I/workdir/project/modules/hal/nordic/nrfx -I/workdir/project/modules/hal/nordic/nrfx/drivers/include -I/workdir/project/modules/hal/nordic/nrfx/mdk -I/workdir/project/zephyr/modules/hal_nordic/nrfx/. -I/workdir/project/modules/lib/openthread/zephyr/../include -I/workdir/project/modules/lib/openthread/zephyr/../examples/platforms -I/workdir/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include -I/workdir/gcc-arm-none-eabi-9-2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -I/workdir/project/application/build/modules/openthread/build/etc/cmake -I/workdir/project/modules/lib/openthread/etc/cmake -I/workdir/project/modules/lib/openthread/include -I/workdir/project/application/build/modules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated/mbedtls -I/workdir/project/application/build/modules/nrfxlib/nrfxlib/nrf_security/include/mbedtls_generated -I/workdir/project/application/build/modules/nrfxlib/nrfxlib/nrf_security/include -I/workdir/project/nrfxlib/nrf_security/include -I/workdir/project/mbedtls/library -I/workdir/project/mbedtls/include -I/workdir/project/mbedtls/include/mbedtls -I/workdir/project/mbedtls/include/psa -I/workdir/project/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -I/workdir/project/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -isystem /workdir/project/nrfxlib/crypto/nrf_cc310_platform/include -Os -imacros /workdir/project/application/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -imacros /workdir/project/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/workdir/project/application/app=CMAKE_SOURCE_DIR -fmacro-prefix-map=/workdir/project/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/workdir/project=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/workdir/project/mbedtls/library/ecjpake.c.obj -MF modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/workdir/project/mbedtls/library/ecjpake.c.obj.d -o modules/nrfxlib/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/workdir/project/mbedtls/library/ecjpake.c.obj -c /workdir/project/mbedtls/library/ecjpake.c
<command-line>: fatal error: nrf-config.h: No such file or directory

```

Parents Reply
  • Hi,

    I mean in the top-level `menuconfig` (west build -b nrf52840dongle_nrf52840 -s app -t menuconfig) it is set to `config-tls-generic.h`.

    I build with command line west.

    Sure you can reproduce easily:

    mkdir project-nrf-connect-test
    cd project-nrf-connect-test
    docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/workdir/project coderbyheart/fw-nrfconnect-nrf-docker:v1.8-branch bash
    west init -m https://github.com/fgervais/project-nrf-connect-test.git --mr openthread-ticket .
    west update
    
    cd application
    west build -b nrf52840dongle_nrf52840 -s app

Children
No Data
Related