zephyr/cmake: add help message for missing nrfxlib case
nrfxlib need to be cloned manullay.
This patch gives a help message to the user in case it
was missing.
Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
diff --git a/boot/zephyr/CMakeLists.txt b/boot/zephyr/CMakeLists.txt
index e2bfcb9..1b6024d 100644
--- a/boot/zephyr/CMakeLists.txt
+++ b/boot/zephyr/CMakeLists.txt
@@ -63,7 +63,17 @@
if(CONFIG_BOOT_USE_NRF_CC310_BL)
set(NRFXLIB_DIR ${ZEPHYR_BASE}/../nrfxlib)
-assert_exists(NRFXLIB_DIR)
+if(NOT EXISTS ${NRFXLIB_DIR})
+ message(FATAL_ERROR "
+ ------------------------------------------------------------------------
+ No such file or directory: ${NRFXLIB_DIR}
+ The current configuration enables nRF CC310 crypto accelerator hardware
+ with the `CONFIG_BOOT_USE_NRF_CC310_BL` option. Please follow
+ `ext/nrf/README.md` guide to fix your setup or use tinycrypt instead of
+ the HW accelerator.
+ To use the tinycrypt set `CONFIG_BOOT_ECDSA_TINYCRYPT` to y.
+ ------------------------------------------------------------------------")
+endif()
# Don't include this if we are using west
add_subdirectory(${NRFXLIB_DIR} ${PROJECT_BINARY_DIR}/nrfxlib)
endif()