Hello,
first I have to say that I'm new with nRF5340, Segger Embedded Studio and Cmake.
I have a working project with CMakeList.txt. So I include it into Segger Embedded Studio (SES) through File / Open nRF Connect SDK Project. After selecting the right toolchain, processor and my directory where CMakeList.txt is lokated it creates the project in SES. The from my side unlucky situation is that there are absolute pathes in the created build files. But I thought with a press on the Project / Run CMake menu the build files are created new.
So when I press Run CMake in the this new created project it fails mostly. Sometimes it works, but most not. The error message I usually see is:
File "C:\ncs\v1.7.1\toolchain\opt\bin\Lib\site-packages\west\util.py", line 82, in west_topdir
raise WestNotFound('Could not find a West workspace '
west.util.WestNotFound: Could not find a West workspace in this or any parent directory
CMake Error at C:/ncs/v1.7.1/nrfxlib/common.cmake:58 (message):
Failed to find mbedtls, cannot build security libraries
Call Stack (most recent call first):
C:/ncs/v1.7.1/nrfxlib/nrf_security/CMakeLists.txt:173 (get_mbedtls_dir)
error: cmake failed
create_nordic_project.py failed (1)
Looking into the mentioned python script it, beneath others, checks the ZEPHY_BASE environment variable, which is set in my envornment.
So why does it mostly fail but sometimes work? Even for a newly created project?
BTW: I'm using Windows 10.
Is even my understanding right, that I can copy all my stuff to a different location on my machine (where the relative pathes beneath my files are still the same) and just have to click on run CMake to get new build (and other) files that contain now the new absolute path to my source items (not to SDK as this location is of course not changed and correctly included as full path).
Regards
Erwin