Hi,
On my machine, I installed the SDK through VSCode with the extension pack. All runs smoothly and I can build from vscode and from command line with :
west build --build-dir c:/Users/Documents/BTM/_build/Hardware/XSWIFI c:/Users/Documents/Project --pristine --board nrf5340 --no-sysbuild --cmake-only -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=c:/Users/Documents/Project/prj.conf -DBOARD_ROOT=./ -DTARGET=NRF53 -DCMAKE_BUILD_TYPE=MinSizeRel -DHAL_NRF5=0 -DZEPHYR_BUILD=ON
My C:\ncs folder looks like this :
Now I would like to be able to install the toolchain and build by command line.
Here is my .bat script :
rem get nrfutil.exe python -m buildTools download "https://files.nordicsemi.com/ui/api/v1/download?repoKey=swtools&path=external/nrfutil/executables/x86_64-pc-windows-msvc/nrfutil.exe" tools\ || goto ERROR \b 1 tools\nrfutil.exe install toolchain-manager || goto ERROR \b 1 tools\nrfutil.exe toolchain-manager install --ncs-version v2.6.0 || goto ERROR \b 1 tools\nrfutil.exe toolchain-manager env --as-script > \tools\zephyr_env.cmd tools\zephyr_env.cmd rem bug with command line utility that don't set ZEPHYR_BASE while creating the script via UI does SET ZEPHYR_BASE=C:\ncs\v2.6.0\zephyr west build --build-dir c:/Users/Documents/BTM/_build/Hardware/XSWIFI c:/Users/Documents/Project --pristine --board nrf5340 --no-sysbuild --cmake-only -- -DNCS_TOOLCHAIN_VERSION=NONE -DCONF_FILE=c:/Users/Documents/Project/prj.conf -DBOARD_ROOT=./ -DTARGET=NRF53 -DCMAKE_BUILD_TYPE=MinSizeRel -DHAL_NRF5=0 -DZEPHYR_BUILD=ON
And the error is :
west: unknown command "build"; do you need to run this inside a workspace?
Thing is, after tools\nrfutil.exe toolchain-manager install --ncs-version v2.6.0, the folder looks like this:
v2.6.0 folder is missing. Why? I assume it is because I didn't performed west init and west update commands and it is the reason west doesn't find the "build" command. I saw the command toolchain-manager launch --terminal but it launches another terminal and my script continue on the first one, which I don't want. How to properly install the complete SDK in a single terminal?
Thank you for you help