8.1 Build MCU firmware
8.1.1 Environment setup
OS Version: Ubuntu 22.04 These steps are verified with Ubuntu 22.04. Other Ubuntu releases may also work but have not been verified. These steps have not been verified on Windows.Required host packages
Compiling on Windows is currently not supported.Python version: 3.12.10 Install the following Python packages:
Note: There have been reports of inconsistent behavior when different binary versions of Python are installed in the samebin/directory. A workaround is to add a symbolic link of the required Python version into a scratch directory and update thePATHenvironment variable to use it.
Zephyr OS setup
- Create a folder at your preferred location for downloading and installing all Zephyr dependencies.
- For maintaining a consistent build environment, it is recommended to use a Python virtual environment.
- From the virtual environment, install and initialize Zephyr:
- Verify the Zephyr versions.
- Zephyr version: 3.7 LTS
- Zephyr SDK version: 0.16.x
- Check the Zephyr compatibility matrix:
- Create the SDK directory:
- Download and set up the required Zephyr SDK version (0.16.x).
Zephyr troubleshooting resources
Install dependencies https://docs.zephyrproject.org/latest/develop/getting_started/index.html#select-and-update-os Zephyr SDK and Python dependencies https://docs.zephyrproject.org/latest/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies Install the Zephyr SDK https://docs.zephyrproject.org/latest/develop/getting_started/index.html#install-the-zephyr-sdk Troubleshooting https://docs.zephyrproject.org/latest/develop/getting_started/index.html#troubleshooting-installation8.1.2 LLVM setup
-
Download and install RISC-V Snapdragon LLVM from QPM3.
Current supported version:
- Snapdragon LLVM (RISC-V): 21.1.1
- To install QPM3 and LLVM, download the package on a Windows host from: https://www.qpm.qualcomm.com Then copy the package to the Ubuntu host.
- Skip this step if QPM3 and the RISC-V toolchain are already installed.
- Install QIKService3 from:
- From the QPM3 UI, install the Snapdragon LLVM RISCV Toolchain OEM toolchain. Current version: 21.1.1
8.1.3 Device tree compiler installation
- Install the Device Tree Compiler (DTC).
8.1.4 Compile subsystem
Environment variables
Run compilation
Navigate to:8.2 Configuration, image generation, and boot flow
- Track logging and console choices explicitly so the first-success path has clear output.
- Enable only the buses you need initially, such as serial or I2C.
- Turn on DMA or GPI only after the simpler path is stable.
- Generate the ELF file, memory map, and packaged MCU image.
- Load the image using the platform-approved programming flow and validate

