Does west build command support building outside of ncs directory?

I can run west build command successfully with the following directories combination.

D:\ncs\v2.4.0\nrf\samples\bluetooth\peripheral_uart

D:\ncs\v2.4.0\nrf\boards\arm\custom_nrf5340

But west build failed with the following directories combination. Does west build command support building outside of ncs directory?

D:\custom\peripheral_uart

D:\custom\boards\custom_nrf5340

The following are log messages of west build.

D:\custom\peripheral_uart>west build -b custom_nrf5340_cpuapp
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: D:/custom/peripheral_uart
-- CMake version: 3.20.5
-- Using NCS Toolchain 2.4.0 for building. (D:/ncs/toolchains/31f4403e35/cmake)
-- Found Python3: D:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: D:/ncs/v2.4.0/zephyr/.cache
-- Zephyr version: 3.3.99 (D:/ncs/v2.4.0/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: custom_nrf5340_cpuapp
No board named 'custom_nrf5340_cpuapp' found.

Procedures to reproduce this issue are as follows.

1. Unzipping custom.zip to D:\ folder.

2. cd D:\custom\peripheral_uart

3. west build -b custom_nrf5340_cpuapp

Related