QEMU not working with NCS v.3.2.1 (or v3.0.0)

I'm unable to get QEMU working on NCS. It's working fine on standard Zephyr.

NCS:

$ west build --pristine -b qemu_cortex_m3 samples/synchronization --no-sysbuild
-- west build: making build dir /home/tfo/ncs/v3.2.1/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/tfo/ncs/v3.2.1/zephyr/samples/synchronization
-- CMake version: 3.21.0
-- Found Python3: /home/tfo/develco/tools-v1.1.0/.venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/tfo/.cache/zephyr
-- Zephyr version: 4.2.99 (/home/tfo/ncs/v3.2.1/zephyr)
-- Found west (found suitable version "1.4.0", minimum required is "0.14.0")
-- Board: qemu_cortex_m3, qualifiers: ti_lm3s6965
-- Found host-tools: zephyr 0.17.0 (/home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.17.0 (/home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk)
-- Found Dtc: /home/tfo/ncs/toolchains/43683a87ea/usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/tfo/ncs/v3.2.1/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3.dts
-- Generated zephyr.dts: /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h

warning: SCHED_CPU_MASK (defined at soc/espressif/esp32/Kconfig.defconfig:23, kernel/Kconfig:122)
was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: ((SMP &&
SOC_SERIES_ESP32 && SOC_FAMILY_ESPRESSIF_ESP32) || SCHED_SIMPLE) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SCHED_CPU_MASK and/or look up
SCHED_CPU_MASK in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.

Parsing /home/tfo/ncs/v3.2.1/zephyr/Kconfig
Loaded configuration '/home/tfo/ncs/v3.2.1/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3_defconfig'
Merged configuration '/home/tfo/ncs/v3.2.1/zephyr/samples/synchronization/prj.conf'
Configuration saved to '/home/tfo/ncs/v3.2.1/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/tfo/ncs/v3.2.1/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/tfo/ncs/toolchains/43683a87ea/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /home/tfo/ncs/toolchains/43683a87ea/usr/bin/ccache
-- Found gen_kobject_list: /home/tfo/ncs/v3.2.1/zephyr/scripts/build/gen_kobject_list.py
-- Configuring done
-- Generating done
-- Build files have been written to: /home/tfo/ncs/v3.2.1/zephyr/build
-- west build: building application
[1/125] Preparing syscall dependency handling

[5/125] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.2.99 (/home/tfo/ncs/v3.2.1/zephyr), build: ncs-v3.2.1
[125/125] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:       11240 B       256 KB      4.29%
             RAM:        6568 B        64 KB     10.02%
        IDT_LIST:          0 GB        32 KB      0.00%
Generating files from /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.elf for board: qemu_cortex_m3

$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m3
/bin/sh: 1: QEMU-NOTFOUND: not found
FAILED: zephyr/CMakeFiles/run_qemu /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/CMakeFiles/run_qemu
cd /home/tfo/ncs/v3.2.1/zephyr/build && QEMU-NOTFOUND -cpu cortex-m3 -machine lm3s6965evb -nographic -vga none -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=6,align=off,sleep=off -rtc clock=vm -kernel /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.elf
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /home/tfo/ncs/toolchains/43683a87ea/usr/local/bin/cmake --build /home/tfo/ncs/v3.2.1/zephyr/build --target run

Zephyr v.4.1.0:

$ west build --pristine -b qemu_cortex_m3 samples/synchronization
-- west build: making build dir /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build pristine
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/samples/synchronization
-- CMake version: 3.28.3
-- Found Python3: /home/tfo/develco/tools-v1.1.0/.venv/bin/python3 (found suitable version "3.12.3", minimum required is "3.10") found components: Interpreter
-- Cache files will be written to: /home/tfo/.cache/zephyr
-- Zephyr version: 4.1.0 (/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr)
-- Found west (found suitable version "1.3.0", minimum required is "0.14.0")
-- Board: qemu_cortex_m3, qualifiers: ti_lm3s6965
-- Found host-tools: zephyr 0.17.0 (/home/tfo/develco/zephyr/zephyr-sdk-0.17.0)
-- Found toolchain: zephyr 0.17.0 (/home/tfo/develco/zephyr/zephyr-sdk-0.17.0)
-- Found Dtc: /home/tfo/develco/zephyr/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3.dts
-- Generated zephyr.dts: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/zephyr.dts
-- Generated pickled edt: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/edt.pickle
-- Generated devicetree_generated.h: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/include/generated/zephyr/devicetree_generated.h
-- Including generated dts.cmake file: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/dts.cmake

warning: SCHED_CPU_MASK (defined at soc/espressif/esp32/Kconfig.defconfig:23, kernel/Kconfig:122)
was assigned the value 'y' but got the value 'n'. Check these unsatisfied dependencies: ((SMP &&
SOC_SERIES_ESP32 && SOC_FAMILY_ESPRESSIF_ESP32) || SCHED_DUMB) (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SCHED_CPU_MASK and/or look up
SCHED_CPU_MASK in the menuconfig/guiconfig interface. The Application Development Primer, Setting
Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
too.

Parsing /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/Kconfig
Loaded configuration '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/boards/qemu/cortex_m3/qemu_cortex_m3_defconfig'
Merged configuration '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/samples/synchronization/prj.conf'
Configuration saved to '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/.config'
Kconfig header saved to '/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/include/generated/zephyr/autoconf.h'
-- Found GnuLd: /home/tfo/develco/zephyr/zephyr-sdk-0.17.0/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd (found version "2.38")
-- The C compiler identification is GNU 12.2.0
-- The CXX compiler identification is GNU 12.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/tfo/develco/zephyr/zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
-- Using ccache: /usr/bin/ccache
-- Configuring done (9.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build
-- west build: building application
[1/117] Preparing syscall dependency handling

[3/117] Generating include/generated/zephyr/version.h
-- Zephyr version: 4.1.0 (/home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr), build: v4.1.0
[117/117] Linking C executable zephyr/zephyr.elf
Memory region         Used Size  Region Size  %age Used
           FLASH:        9508 B       256 KB      3.63%
             RAM:        6560 B        64 KB     10.01%
        IDT_LIST:          0 GB        32 KB      0.00%
Generating files from /home/tfo/develco/zephyr/zephyr-project-v4.1.0/zephyr/build/zephyr/zephyr.elf for board: qemu_cortex_m3

$ west build -t run
-- west build: running target run
[0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m3
qemu-system-arm: warning: nic stellaris_enet.0 has no peer
Timer with period zero, disabling
*** Booting Zephyr OS build v4.1.0 ***
thread_a: Hello World from cpu 0 on qemu_cortex_m3!
thread_b: Hello World from cpu 0 on qemu_cortex_m3!
thread_a: Hello World from cpu 0 on qemu_cortex_m3!
thread_b: Hello World from cpu 0 on qemu_cortex_m3!
thread_a: Hello World from cpu 0 on qemu_cortex_m3!

What am I missing?

Parents
  • $ apt list | grep qemu aqemu/noble 0.9.2-3ubuntu2 amd64 golang-github-digitalocean-go-qemu-dev/noble 0.0~git20230711.2e3d018-1 all grub-firmware-qemu/noble-updates 2.12-1ubuntu7.3 amd64 ipxe-qemu-256k-compat-efi-roms/noble,now 1.0.0+git-20150424.a25a16d-0ubuntu5 all [installed,automatic] ipxe-qemu/noble,now 1.21.1+git-20220113.fbbdc3926-0ubuntu2 all [installed,automatic] libvirt-clients-qemu/noble-updates,noble-security 10.0.0-2ubuntu8.11 all libvirt-daemon-driver-qemu/noble-updates,noble-security 10.0.0-2ubuntu8.11 amd64 nova-compute-qemu/noble-updates,noble-security 3:29.2.0-0ubuntu1.3 all oem-qemu-meta/noble 20.04~ubuntu6 all qemu-block-extra/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-block-supplemental/noble-updates 1:8.2.2+ds-0ubuntu1.12 amd64 qemu-efi-aarch64/noble-updates,noble-security,now 2024.02-2ubuntu0.7 all [installed,automatic] qemu-efi-arm/noble-updates,noble-security,now 2024.02-2ubuntu0.7 all [installed,automatic] qemu-efi-riscv64/noble-updates,noble-security 2024.02-2ubuntu0.7 all qemu-guest-agent/noble-updates 1:8.2.2+ds-0ubuntu1.12 amd64 qemu-system-arm/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-common/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-data/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 all [installed,automatic] qemu-system-gui/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-mips/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-misc/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-modules-opengl/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-modules-spice/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-ppc/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-s390x/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-sparc/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-x86-xen/noble-updates 1:8.2.2+ds-0ubuntu1.12 amd64 qemu-system-x86/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-system-xen/noble-updates 1:8.2.2+ds-0ubuntu1.12 amd64 qemu-system/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed] qemu-user-binfmt/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-user-static/noble-updates 1:8.2.2+ds-0ubuntu1.12 amd64 qemu-user/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed] qemu-utils/noble-updates,now 1:8.2.2+ds-0ubuntu1.12 amd64 [installed,automatic] qemu-web-desktop/noble 24.01.19+ds1-3 amd64 qemubuilder/noble 0.89 amd64 sbuild-qemu/noble-updates 0.85.10ubuntu0.2 all u-boot-qemu/noble-updates,noble-security 2025.10-0ubuntu0.24.04.2 all $ west build -t run -- west build: running target run [0/1] To exit from QEMU enter: 'CTRL+a, x'[QEMU] CPU: cortex-m3 /bin/sh: 1: QEMU-NOTFOUND: not found FAILED: zephyr/CMakeFiles/run_qemu /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/CMakeFiles/run_qemu cd /home/tfo/ncs/v3.2.1/zephyr/build && QEMU-NOTFOUND -cpu cortex-m3 -machine lm3s6965evb -nographic -vga none -net none -pidfile qemu.pid -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -icount shift=6,align=off,sleep=off -rtc clock=vm -kernel /home/tfo/ncs/v3.2.1/zephyr/build/zephyr/zephyr.elf ninja: build stopped: subcommand failed. FATAL ERROR: command exited with status 1: /home/tfo/ncs/toolchains/43683a87ea/usr/local/bin/cmake --build /home/tfo/ncs/v3.2.1/zephyr/build --target run

  • I had already installed qemu-user and tried installing qemu-system, but I still get the same error.

Reply Children
Related