This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Error while building many examples using SEGGER Embedded Studio (nRF Connect SDK 1.4.1)

I tried different nrfconnect examples and noticed that:

C:/Nordic/v1.4.1/zephyr/samples/basic/blinky/build_nrf9160dk_nrf9160
blinky: rebuild solution + flash: OK

also hello_world ok for build_nrf9160dk_nrf9160

But then not able to build lte example or bluetooth examples, I tried both build_nrf9160dk_nrf9160 and build_nrf9160dk_nrf9160ns.

Usually the first part is OK:

...
Loading session data from file
SEGGER Embedded Studio is ready to use

But when building having errors like:

Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir’ from solution ‘build’ in configuration ‘Common’
1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir does not exist.
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir’
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E make_directory C:/Nordic/v1.4.1/nrf/samples/spm
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E make_directory C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/spm
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E make_directory C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E make_directory C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/tmp
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E make_directory C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E make_directory C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E touch C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download’ from solution ‘build’ in configuration ‘Common’
1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download does not exist.
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download’
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E echo_append
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E touch C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-download
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update’ from solution ‘build’ in configuration ‘Common’
1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update does not exist.
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update’
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E echo_append
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E touch C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-update
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch’ from solution ‘build’ in configuration ‘Common’
1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch does not exist.
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch’
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E echo_append
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E touch C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-patch
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure’ from solution ‘build’ in configuration ‘Common’
1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure does not exist.
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure’
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E echo_append
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe -E touch C:/Nordic/v1.4.1/nrf/applications/asset_tracker/build_nrf9160dk_nrf9160ns/modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-configure
Rebuilding ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’ from solution ‘build’ in configuration ‘Common’
1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build does not exist.
1> Combining ‘modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-build’
1> C:\Nordic\v1.4.1\toolchain\opt\bin\cmake.exe --build . --
1> [1/193] Building C object modules/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedtls_external.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> FAILED: modules/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedtls_external.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> ccache C:\Nordic\v1.4.1\toolchain\opt\bin\arm-none-eabi-gcc.exe    -MD -MT modules/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedtls_external.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj -MF modules\nrfxlib\nrf_security\src\mbedtls\CMakeFiles\mbedtls_external.dir\C_\Nordic\v1.4.1\zephyr\misc\empty_file.c.obj.d -o modules/nrfxlib/nrf_security/src/mbedtls/CMakeFiles/mbedtls_external.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj   -c C:/Nordic/v1.4.1/zephyr/misc/empty_file.c
1> CreateProcess failed: The system cannot find the file specified.
1> [2/193] Building C object modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/mbedtls/library/sha512.c.obj
1> FAILED: modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/mbedtls/library/sha512.c.obj
1> ccache C:\Nordic\v1.4.1\toolchain\opt\bin\arm-none-eabi-gcc.exe -DMBEDTLS_CONFIG_FILE=\"nrf-config-noglue.h\" -IC:/Nordic/v1.4.1/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -IC:/Nordic/v1.4.1/nrfxlib/crypto/nrf_cc310_platform/include -IC:/Nordic/v1.4.1/mbedtls/include -IC:/Nordic/v1.4.1/mbedtls/include/mbedtls -Imodules/nrfxlib/nrf_security/include -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -MD -MT modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/mbedtls/library/sha512.c.obj -MF modules\nrfxlib\nrf_security\src\mbedtls\shared\CMakeFiles\mbedcrypto_shared.dir\C_\Nordic\v1.4.1\mbedtls\library\sha512.c.obj.d -o modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/mbedtls/library/sha512.c.obj   -c C:/Nordic/v1.4.1/mbedtls/library/sha512.c
1> CreateProcess failed: The system cannot find the file specified.
1> [3/193] Building C object modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> FAILED: modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> ccache C:\Nordic\v1.4.1\toolchain\opt\bin\arm-none-eabi-gcc.exe -DMBEDTLS_CONFIG_FILE=\"nrf-config-noglue.h\" -IC:/Nordic/v1.4.1/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -IC:/Nordic/v1.4.1/nrfxlib/crypto/nrf_cc310_platform/include -IC:/Nordic/v1.4.1/mbedtls/include -IC:/Nordic/v1.4.1/mbedtls/include/mbedtls -Imodules/nrfxlib/nrf_security/include -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -MD -MT modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj -MF modules\nrfxlib\nrf_security\src\mbedtls\shared\CMakeFiles\mbedcrypto_shared.dir\C_\Nordic\v1.4.1\zephyr\misc\empty_file.c.obj.d -o modules/nrfxlib/nrf_security/src/mbedtls/shared/CMakeFiles/mbedcrypto_shared.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj   -c C:/Nordic/v1.4.1/zephyr/misc/empty_file.c
1> CreateProcess failed: The system cannot find the file specified.
1> [4/193] Building C object modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> FAILED: modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> ccache C:\Nordic\v1.4.1\toolchain\opt\bin\arm-none-eabi-gcc.exe -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -IC:/Nordic/v1.4.1/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -IC:/Nordic/v1.4.1/mbedtls/include -IC:/Nordic/v1.4.1/mbedtls/include/mbedtls -Imodules/nrfxlib/nrf_security/include -IC:/Nordic/v1.4.1/nrfxlib/nrf_security/include/mbedcrypto_glue/mbedtls/threading -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -MD -MT modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj -MF modules\nrfxlib\nrf_security\src\mbedtls\cc310\CMakeFiles\mbedcrypto_cc3xx_noglue.dir\C_\Nordic\v1.4.1\zephyr\misc\empty_file.c.obj.d -o modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx_noglue.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj   -c C:/Nordic/v1.4.1/zephyr/misc/empty_file.c
1> CreateProcess failed: The system cannot find the file specified.
1> [5/193] Building C object modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> FAILED: modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj
1> ccache C:\Nordic\v1.4.1\toolchain\opt\bin\arm-none-eabi-gcc.exe    -MD -MT modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj -MF modules\nrfxlib\nrf_security\src\mbedtls\cc310\CMakeFiles\mbedcrypto_cc3xx.dir\C_\Nordic\v1.4.1\zephyr\misc\empty_file.c.obj.d -o modules/nrfxlib/nrf_security/src/mbedtls/cc310/CMakeFiles/mbedcrypto_cc3xx.dir/C_/Nordic/v1.4.1/zephyr/misc/empty_file.c.obj   -c C:/Nordic/v1.4.1/zephyr/misc/empty_file.c
1> CreateProcess failed: The system cannot find the file specified.
1> ninja: fatal: ReadFile: The handle is invalid.
1>
1>
Build failed

Above is many "does not exist" errors but how to avoid those when using default examples?

1> modules/nrf/samples/spm_subimage-prefix/src/spm_subimage-stamp/spm_subimage-mkdir does not exist.

C:\Nordic\v1.4.1\nrf\applications\serial_lte_modem\build_nrf9160dk_nrf9160ns\modules\nrf\samples\spm_subimage-prefix\src\spm_subimage-stamp

here is that asked "spm_subimage-mkdir"

But:
C:\Nordic\v1.4.1\modules
here is not any nrf directory

Thus is there some issues with paths?

When trying the same without ns :

C:/Nordic/v1.4.1/nrf/applications/serial_lte_modem/build_nrf9160dk_nrf9160

then not able to create project due to this segger error msg:

create_nordic_project.py failed

I checked related other quite similar errors here in support pages but did not solve my issues with those. I already re-installed to "C:/Nordic" in order to have somewhat shorter path but it did not help in this case.

Somewhere few weeks ago was said that cmake has errors. Is that still valid comment or is it now fixed in v1.4.1?

--

Not related to this error but would improve usability:

when trying to start new project via File → Open nRF Connect SDK Project.. and if it fails due to whatever reason then the UI window would stay and no need to re-select everything.

Parents Reply Children
Related