Before initializing, start the toolchain environment:
nrfutil sdk-manager toolchain launch --ncs-version v3.4.0 --shell
You can also run a single command within a specific nRF Connect SDK toolchain. For example:
nrfutil sdk-manager toolchain launch --ncs-version v3.4.0 -- <your command>
This form is useful for running, for instance, a single west command with a specific toolchain. You can create an alias or shell function for this command to avoid typing it in full every time.
To initialize the workspace folder (smha-workspace) where the firmware project and all nRF Connect SDK modules will be cloned, run the following commands:
# Initialize the smha-workspace workspace
west init -m https://github.com/nrfconnect/ncs-serial-modem-host-applications --mr main smha-workspace
cd smha-workspace/project
# Update nRF Connect SDK modules. This may take a while.
west update
The repository is now cloned into the smha-workspace/project folder, the west modules are downloaded, and you are ready to build an application.