Hello,
I am trying to setup a windows docker image to use on a build server for zephyr nrfsdk projects, but i am haveing difficulty getting things configured correctly.
For setting up the sdk, I am using this powershell script (which seems to be working correctly):
[string]$ncs_path = "C:/ncs" function Install-Nrf-Sdk { param ( [string]$version ) [string]$sdk_path = "$ncs_path/$version" [string]$venv_path = "$sdk_path/python-env" python -m pip install virtualenv python -m venv "$venv_path" . "$venv_path/Scripts/activate.ps1" python -m pip install west west init -m https://github.com/nrfconnect/sdk-nrf --mr $version "$sdk_path" $Env:ZEPHYR_BASE = "$sdk_path" west update pip3 install -r "$sdk_path/zephyr/scripts/requirements.txt" pip3 install -r "$sdk_path/nrf/scripts/requirements.txt" pip3 install -r "$sdk_path/bootloader/mcuboot/scripts/requirements.txt" deactivate } Install-Nrf-Sdk "v1.6.1"
For the project build step, the projects use custom boards and have `set(BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/)` in the `CMakeList.txt` and the working directory is set to the project directory. Then this powershell script is run:
[string]$ncs_path = "C:/ncs" [string]$version = "$(SDK_VERSION)" [string]$sdk_path = "$ncs_path/$version" [string]$venv_path = "$sdk_path/python-env" . "$venv_path/Scripts/activate.ps1" $Env:ZEPHYR_BASE="$sdk_path\zephyr" . "$Env:ZEPHYR_BASE\zephyr-env.cmd" west zephyr-export $Env:ZEPHYR_TOOLCHAIN_VARIANT="gnuarmemb" $Env:GNUARMEMB_TOOLCHAIN_PATH="C:/Tools/arm-eabi" cmake . -G "Ninja" -DCMAKE_BUILD_TYPE=RELEASE -DBOARD="$(BOARD_TYPE)" -DCONF_FILE="Release.conf" -B ./build ninja -C ./build
But the build is failing
Zephyr (C:/ncs/v1.6.1/zephyr/share/zephyr-package/cmake) has been added to the user package registry in: HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr ZephyrUnittest (C:/ncs/v1.6.1/zephyr/share/zephyrunittest-package/cmake) has been added to the user package registry in: HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\ZephyrUnittest Including boilerplate (Zephyr base (cached)): C:/ncs/v1.6.1/zephyr/cmake/app/boilerplate.cmake -- Application: C:/azp/agent/_work/1/s/Embedded.Firmware.TagBeacon.RTOS -- Zephyr version: 2.6.0-rc1 (C:/ncs/v1.6.1/zephyr), build: v2.6.0-rc1-ncs1 -- Found west (found suitable version "0.11.0", minimum required is "0.7.1") -- Board: core_plt003 -- Cache files will be written to: C:/ncs/v1.6.1/zephyr/.cache CMake Error at C:/ncs/v1.6.1/zephyr/cmake/generic_toolchain.cmake:36 (include): include could not find load file: C:\Tools\arm-eabi/cmake/toolchain/gnuarmemb/generic.cmake Call Stack (most recent call first): C:/ncs/v1.6.1/zephyr/cmake/app/boilerplate.cmake:553 (include) C:/ncs/v1.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include) C:/ncs/v1.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate) CMakeLists.txt:10 (find_package) -- Found BOARD.dts: C:/azp/agent/_work/1/s/Embedded.Firmware.TagBeacon.RTOS/boards/arm/core_plt003/core_plt003.dts CMake Error at C:/ncs/v1.6.1/zephyr/cmake/dts.cmake:157 (message): command failed with return code: The system cannot find the file specified Call Stack (most recent call first): C:/ncs/v1.6.1/zephyr/cmake/app/boilerplate.cmake:554 (include) C:/ncs/v1.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include) C:/ncs/v1.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate) CMakeLists.txt:10 (find_package)
Is there any documentation on how to correctly setup a build server?